Exemplo n.º 1
0
 void Start()
 {
     guestList = new List <Guest>(GetComponentsInChildren <Guest> ());
     state     = GuestGroupState.JoinAndWait;
     ChangeAllGuestState(Guest.GuestState.JoinAndWait);
     CallStaffWhenEnter();
 }
Exemplo n.º 2
0
    // Angry stand up
    // Just use everything then stand up

    // Called by RemainGuestCheck
    public void StandUpTable(Guest guest)
    {
        guestList.Remove(guest);
        if (guestList.Count == 0)
        {
            ownTable.isUsing = false;
            state            = GuestGroupState.Want2Exit;
        }
    }
Exemplo n.º 3
0
    // Every guest in this group
    // They take one table
    void TakeTableForeach(Table table)
    {
        for (int i = 0; i < guestList.Count; i++)
        {
            // Order to each
            guestList [i].Say(ScriptM.thankYou);
            guestList [i].GoToSocketAndUse(table.chairs[i]);
            guestList [i].ownChair = table.chairs [i];
        }
        state = GuestGroupState.Guidance2Table;

        // Should to call this after sit on chair
        ChangeAllGuestState(Guest.GuestState.FirstGo2Chair);
    }
Exemplo n.º 4
0
    // Guidance to Table
    public bool TakeTable(Table table)
    {
        bool t = CheckThisGroupCanSitOnTableChairs(table);

        if (t)
        {
            state    = GuestGroupState.Guidance2Table;
            ownTable = table;
            TakeTableForeach(table);
        }
        else
        {
            Debug.LogError("what the f**k? Can't sit?? check StaffM.CheckEmptyTable..");
        }
        return(t);
    }