miepzerino
2025-03-29 ad79d9ca49274cc660fc2030a071b24314f0f210
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using UnityEngine;
 
namespace Flexalon
{
    public enum InputMode
    {
        /// <summary> A ray is provided to determine which object is hovered and how it should be moved. </summary>
        Raycast,
 
        /// <summary> Objects are moved by an external system. Only state changes are provided. </summary>
        External
    }
 
    /// <summary> Implement this interface and assign it to the Flexalon.InputProvider
    /// to override how FlexalonInteractables receive input. </summary>
    public interface InputProvider
    {
        InputMode InputMode { get; }
 
        /// <summary> True if the input is active, e.g. button is being held down. </summary>
        bool Active { get; }
 
        /// <summary> In Raycast Mode, the screen-space position used to pick UI objects. </summary>
        Vector3 UIPointer { get; }
 
        /// <summary> In Raycast Mode, the ray to cast to determine what should be moved / hit. </summary>
        Ray Ray { get; }
 
        /// <summary> In External Mode, the object that is currently being hovered or selected. </summary>
        GameObject ExternalFocusedObject { get; }
    }
}