C# Класс Supermarket.Customer

Покупатель
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Awake void
NotifyListeners void
OnEnable void
Start void
Update void

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
Awake ( ) : void
NotifyListeners ( ) : void
OnEnable ( ) : void
Start ( ) : void
Update ( ) : void

Описание методов

AddListener() публичный Метод

public AddListener ( ICustomerStateListener listener ) : void
listener ICustomerStateListener
Результат void

Destroy() публичный Метод

Destroys this customer. Preserves the selection object (if attached) by calling its deselect method.
public Destroy ( ) : void
Результат void

DisableCollisions() публичный Метод

public DisableCollisions ( ) : void
Результат void

EnableCollisions() публичный Метод

public EnableCollisions ( ) : void
Результат void

FindTask() публичный Метод

public FindTask ( ) : void
Результат void

Initialize() публичный Метод

Fills the customers shopping list and wallet and sets it to Shop state
public Initialize ( ) : void
Результат void

Move() публичный Метод

Tells the customer to move to a given position in the supermarket
public Move ( Vector3 position ) : void
position Vector3 The position to move to
Результат void

OnAwareOf() публичный Метод

public OnAwareOf ( Shelf shelf ) : void
shelf Shelf
Результат void

OnCommand() публичный Метод

public OnCommand ( Collider clicked, Vector3 position ) : void
clicked Collider
position Vector3
Результат void

OnDeselect() публичный Метод

public OnDeselect ( ) : void
Результат void

OnDrop() публичный Метод

public OnDrop ( ) : void
Результат void

OnInteract() публичный Метод

public OnInteract ( InteractionZone other ) : void
other InteractionZone
Результат void

OnPickUp() публичный Метод

public OnPickUp ( ) : void
Результат void

OnSelect() публичный Метод

public OnSelect ( ) : void
Результат void

Pay() публичный Метод

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
Результат void

RemoveListener() публичный Метод

public RemoveListener ( ICustomerStateListener listener ) : void
listener ICustomerStateListener
Результат void

SetState() публичный Метод

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.
Результат void

ShelfLocationKnown() публичный Метод

public ShelfLocationKnown ( string product ) : bool
product string
Результат bool

Think() публичный Метод

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.
Результат void