C# Class Supermarket.Customer

Покупатель
显示文件 Open project: Clarksj4/Theme-Supermarket-Tycoon-World Class Usage Examples

Private Properties

Property Type Description
Awake void
NotifyListeners void
OnEnable void
Start void
Update void

Public Methods

Method Description
AddListener ( ICustomerStateListener listener ) : void
Destroy ( ) : void

Destroys this customer. Preserves the selection object (if attached) by calling its deselect method.

DisableCollisions ( ) : void
EnableCollisions ( ) : void
FindTask ( ) : void
Initialize ( ) : void

Fills the customers shopping list and wallet and sets it to Shop state

Move ( Vector3 position ) : void

Tells the customer to move to a given position in the supermarket

OnAwareOf ( Shelf shelf ) : void
OnCommand ( Collider clicked, Vector3 position ) : void
OnDeselect ( ) : void
OnDrop ( ) : void
OnInteract ( InteractionZone other ) : void
OnPickUp ( ) : void
OnSelect ( ) : void
Pay ( Checkout checkout ) : void

Makes the customer give money to the given checkout. The money is subtracted from the customers wallet

RemoveListener ( ICustomerStateListener listener ) : void
SetState ( CustomerState state ) : void

Assign customer state to given state then call the state's initialize method

ShelfLocationKnown ( string product ) : bool
Think ( GameObject subject ) : void

Displays the given object in the customer's thoguht bubble for a limited time

Private Methods

Method Description
Awake ( ) : void
NotifyListeners ( ) : void
OnEnable ( ) : void
Start ( ) : void
Update ( ) : void

Method Details

AddListener() public method

public AddListener ( ICustomerStateListener listener ) : void
listener ICustomerStateListener
return void

Destroy() public method

Destroys this customer. Preserves the selection object (if attached) by calling its deselect method.
public Destroy ( ) : void
return void

DisableCollisions() public method

public DisableCollisions ( ) : void
return void

EnableCollisions() public method

public EnableCollisions ( ) : void
return void

FindTask() public method

public FindTask ( ) : void
return void

Initialize() public method

Fills the customers shopping list and wallet and sets it to Shop state
public Initialize ( ) : void
return void

Move() public method

Tells the customer to move to a given position in the supermarket
public Move ( Vector3 position ) : void
position Vector3 The position to move to
return void

OnAwareOf() public method

public OnAwareOf ( Shelf shelf ) : void
shelf Shelf
return void

OnCommand() public method

public OnCommand ( Collider clicked, Vector3 position ) : void
clicked Collider
position Vector3
return void

OnDeselect() public method

public OnDeselect ( ) : void
return void

OnDrop() public method

public OnDrop ( ) : void
return void

OnInteract() public method

public OnInteract ( InteractionZone other ) : void
other InteractionZone
return void

OnPickUp() public method

public OnPickUp ( ) : void
return void

OnSelect() public method

public OnSelect ( ) : void
return void

Pay() public method

Makes the customer give money to the given checkout. The money is subtracted from the customers wallet
public Pay ( Checkout checkout ) : void
checkout Checkout The checkout to pay the money to
return void

RemoveListener() public method

public RemoveListener ( ICustomerStateListener listener ) : void
listener ICustomerStateListener
return void

SetState() public method

Assign customer state to given state then call the state's initialize method
public SetState ( CustomerState state ) : void
state CustomerState The state to change to.
return void

ShelfLocationKnown() public method

public ShelfLocationKnown ( string product ) : bool
product string
return bool

Think() public method

Displays the given object in the customer's thoguht bubble for a limited time
public Think ( GameObject subject ) : void
subject GameObject The object to display in the customer's thought bubble. The object is assumed /// to be sized correctly.
return void