|
FrameIT
|
Base class for all Gadgets to derive from. A Gadget is a tool for the player (and level editor) to interact with the GameWorld. More...
Classes | |
| class | UndefinedGadget |
Public Types | |
| enum | GadgetIDs { Unused = -3 , Undefined = -1 , Pointer = 0 , Tape = 1 , AngleTool = 2 , LineTool = 3 , LotTool = 4 , Pendulum = 5 , PoleTool = 6 , Remover = 7 , EqualCircles = 8 , MiddlePoint = 9 } |
| Used to map to a T:Gadget More... | |
Public Member Functions | |
| Gadget () | |
| void | Init (bool overrite) |
| void | Awake () |
| void | Enable () |
| void | Disable () |
| void | Update () |
| void | Hit (RaycastHit[] hit) |
| void | ResetGadget () |
Static Public Member Functions | |
| static bool | Equals (Gadget a, Gadget b) |
Public Attributes | |
| int | Rank = int.MinValue |
| Position in tool belt. More... | |
| string | UiName = null |
| Tool Name More... | |
| float | MaxRange = float.NegativeInfinity |
| Maximum range for this Tool. For consistency use GadgetDistances in GlobalBehaviour. More... | |
| float | MaxHeight = float.NegativeInfinity |
| int | ButtonIndx = -1 |
| Which sprite to use More... | |
| int | MaterialIndx = -1 |
| LayerMask | LayerHitMask = -1 |
| Layers to ignore for this gadget by default. More... | |
| LayerMask | SecondaryLayerMask = -1 |
| List< string > | Workflow = new() |
| Keeps track of selected Fact.Ids the Gadget used to produce a single Fact. More... | |
Static Public Attributes | |
| static Dictionary< Type, GadgetIDs > | GadgetTypeToIDs |
| static readonly IEnumerable< Type > | GadgetTypes = Assembly.GetExecutingAssembly().GetTypes().Where(t => t != typeof(Gadget) && typeof(Gadget).IsAssignableFrom(t)) |
Collection of Types of all available Gadgets to choose from. More... | |
Protected Member Functions | |
| virtual void | _Awake () |
| virtual void | _Enable () |
| virtual void | _Disable () |
| virtual void | _Update () |
| virtual void | _Hit (RaycastHit[] hit) |
| Called when CommunicationEvents.TriggerEvent is invoked, a.k.a. when Player clicks in GameWorld. More... | |
| void | ActivateLineDrawing () |
| void | DeactivateLineDrawing () |
| void | UpdateLineDrawing () |
| virtual void | _ActivateLineDrawing () |
| virtual void | _DeactivateLineDrawing () |
| virtual void | _UpdateLineDrawing () |
| Vector3 | GetPosition (int i) |
| void | SetPosition (int i, Vector3 v) |
| void | SetPositions (Vector3[] v) |
| virtual void | _ResetGadget () |
| virtual void | _Update_Range () |
Static Protected Attributes | |
| static string | s_type = "ERROR: set s_type in T:Gadget" |
Private Attributes | |
| bool | init_success = false |
Base class for all Gadgets to derive from. A Gadget is a tool for the player (and level editor) to interact with the GameWorld.
| enum Gadget.GadgetIDs |
Used to map to a T:Gadget
Do NOT rename elements! Do NOT change values! Deserialization relies on it!
| Enumerator | |
|---|---|
| Unused | |
| Undefined | |
| Pointer | |
| Tape | |
| AngleTool | |
| LineTool | |
| LotTool | |
| Pendulum | |
| PoleTool | |
| Remover | |
| EqualCircles | |
| MiddlePoint | |
| Gadget.Gadget | ( | ) |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Called when CommunicationEvents.TriggerEvent is invoked, a.k.a. when Player clicks in GameWorld.
| hit | the position where it was clicked |
Reimplemented in AngleTool, EqualCircleGadget, LineTool, LotTool, Pendulum, Pointer, PoleTool, Remover, Tape, and TestMiddlePoint.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
| void Gadget.Awake | ( | ) |
|
protected |
| void Gadget.Disable | ( | ) |
| void Gadget.Enable | ( | ) |
|
protected |
| void Gadget.Hit | ( | RaycastHit[] | hit | ) |
| void Gadget.Init | ( | bool | overrite | ) |
| void Gadget.ResetGadget | ( | ) |
|
protected |
|
protected |
| void Gadget.Update | ( | ) |
|
protected |
| int Gadget.ButtonIndx = -1 |
Which sprite to use
|
static |
Collection of Types of all available Gadgets to choose from.
|
static |
|
private |
| LayerMask Gadget.LayerHitMask = -1 |
Layers to ignore for this gadget by default.
Set in Inspector
| int Gadget.MaterialIndx = -1 |
| float Gadget.MaxHeight = float.NegativeInfinity |
| float Gadget.MaxRange = float.NegativeInfinity |
Maximum range for this Tool. For consistency use GadgetDistances in GlobalBehaviour.
Set in Inspector or Awake
| int Gadget.Rank = int.MinValue |
Position in tool belt.
Set in Inspector or Awake
|
staticprotected |
[ClassName] for JSON de-/serialization. Set in every non-abstract subclass of Gadget. Also add JsonSubtypes.KnownSubType attribute for deserialization to Gadget!
| LayerMask Gadget.SecondaryLayerMask = -1 |
| string Gadget.UiName = null |
Tool Name
Set in Inspector or Awake
| List<string> Gadget.Workflow = new() |