FrameIT
Gadget Class Reference

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...

Inheritance diagram for Gadget:
AngleTool ExtraGadget LineTool LotTool Pendulum Pointer PoleTool Remover Tape

Public Member Functions

virtual void OnHit (RaycastHit hit)
 Called when CommunicationEvents.TriggerEvent is invoked, a.k.a. when Player clicks in GameWorld. More...
 

Public Attributes

int id = -1
 Position in tool belt. More...
 
string UiName = "Name Not Set"
 Tool Name More...
 
float MaxRange
 Maximum range for this Tool. For consistency use GadgetDistances in GlobalBehaviour. More...
 
Sprite Sprite
 Which sprite to use More...
 
LayerMask ignoreLayerMask
 Layers to ignore for thid gadget by default. More...
 
WorldCursor Cursor
 Which cursor to use More...
 

Protected Member Functions

void Awake ()
 
void OnEnable ()
 

Detailed Description

Base class for all Gadgets to derive from. A Gadget is a tool for the player (and level editor) to interact with the GameWorld.

Member Function Documentation

◆ Awake()

void Gadget.Awake ( )
protected

◆ OnEnable()

void Gadget.OnEnable ( )
protected

◆ OnHit()

virtual void Gadget.OnHit ( RaycastHit  hit)
virtual

Called when CommunicationEvents.TriggerEvent is invoked, a.k.a. when Player clicks in GameWorld.

Parameters
hitthe position where it was clicked

Reimplemented in AngleTool, ExtraGadget, LineTool, LotTool, Pendulum, Pointer, PoleTool, Remover, and Tape.

Member Data Documentation

◆ Cursor

WorldCursor Gadget.Cursor

Which cursor to use

When not set in Inspector, will be searching for any WorldCursor.

◆ id

int Gadget.id = -1

Position in tool belt.

Set in Inspector or Awake

◆ ignoreLayerMask

LayerMask Gadget.ignoreLayerMask

Layers to ignore for thid gadget by default.

Set in Inspector

◆ MaxRange

float Gadget.MaxRange

Maximum range for this Tool. For consistency use GadgetDistances in GlobalBehaviour.

Set in Inspector or Awake

◆ Sprite

Sprite Gadget.Sprite

Which sprite to use

Set in Inspector

◆ UiName

string Gadget.UiName = "Name Not Set"

Tool Name

Set in Inspector or Awake


The documentation for this class was generated from the following file: