C# Class Supermarket.Selection

Behaviour that handles the selection of gameObjects. Remembers the selected gameObject; follows and applies a visual effect that highlights it.
Inheritance: UnityEngine.MonoBehaviour
Show file Open project: Clarksj4/Theme-Supermarket-Tycoon-World Class Usage Examples

Public Methods

Method Description
Deselect ( ) : void
DisableInput ( ) : void
EnableInput ( ) : void
Pickup ( Collider target ) : void

Private Methods

Method Description
Awake ( ) : void

Awake retrieves visualEffects child object reference and disables it.

Select ( Collider target ) : void

Selects the given gameObject. A selected gameObject is followed and highlighted by a visual effect, and has its statistics displayed on the UI.

Update ( ) : void

Update checks for mouse clicks to in order to select and deselect gameObjects. Only does so when the mouse is not over a UI element.

Method Details

Deselect() public method

public Deselect ( ) : void
return void

DisableInput() public method

public DisableInput ( ) : void
return void

EnableInput() public method

public EnableInput ( ) : void
return void

Pickup() public method

public Pickup ( Collider target ) : void
target UnityEngine.Collider
return void