예제 #1
0
    // Called by GuestGroup
    public void AddEntryWaitingGuestGroup(GuestGroup guestGroup)
    {
        cakeslice.OutlineAnimation.self.SetActive(true);

        entryWaitingGuestGroup.Enqueue(new EntryWaitingGuestGroup(guestGroup));
        NoticeM.UseNotice(ScriptM.guestHere, EntryTable.self.transform.position);

        // Call Staff to EntryTable
        StaffM.self.CallStaffForGuidance2Table(new WaitingGuestGroup(guestGroup, RequestType.Table));
    }
예제 #2
0
    void MakeFood()
    {
        NoticeM.UseNotice("음식나옴", transform.position);
        var t = Instantiate(foodTemplate);

        t.remainFoodAmount   = 1;
        t.type               = makeType;
        outFood              = t;
        t.transform.position = exitSocket.position;
    }
예제 #3
0
    // Called by Staff
    public void CleanDish()
    {
        if (waitingDishes.Count <= 0)
        {
            return;
        }
        NoticeM.UseNotice("Clean!", transform.position);
        var t = dutyPoint.Remove();

        cleanedPoint.Add(t.transform);
        // Take Clean
        var i = waitingDishes.Count - 1;

        waitingDishes[i].isClean = true;
        cleanedDishes.Add(waitingDishes[i]);
        waitingDishes.RemoveAt(i);
    }
예제 #4
0
    void Start()
    {
        chairs = new Chair[transform.childCount];
        chairs = transform.GetComponentsInChildren <Chair> ();

        var tt = transform.GetChild(4);

        dishPoint = new Transform[tt.childCount];
        for (int i = 0; i < tt.childCount; i++)
        {
            dishPoint[i] = tt.GetChild(i);
        }

        EatUpAllDishPoint = transform.GetChild(3);

        statusNotice = NoticeM.UseStaticNotice("Not Use", transform.position + Vector3.up * 1.3f);
    }
예제 #5
0
    public bool Use(Person person)
    {
        var t1 = person as Guest;
        var t2 = person as Staff;

        if (t1 != null)
        {
            TakeDish();
            return(true);
        }
        else if (t2 != null)
        {
            // Put dish
            // If Just one dish was dirty
            var tDishes = t2.GetHavingDishes();
            if (tDishes.Count > 0)
            {
                bool isDirty = false;
                foreach (var item in tDishes)
                {
                    if (!item.isClean)
                    {
                        isDirty = true;
                        break;
                    }
                }
                if (!isDirty)
                {
                    PutDishes(t2.GiveHavingDishes());
                }
                else
                {
                    NoticeM.UseNotice("Dirty! Wash First", transform.position);
                }
                return(true);
            }
            else
            {
                // Take Dish
                TakeDishToPerson(person);
            }
        }
        return(false);
    }
예제 #6
0
    void Start()
    {
        food                 = new List <Food>(GetComponentsInChildren <Food>());
        foodTableDish        = new FoodTableDish[food.Count];
        prevFoodRemainAmount = new float[food.Count];

        for (int i = 0; i < food.Count; i++)
        {
            foodTableDish[i]            = food [i].transform.GetComponentInParent <FoodTableDish> ();
            foodTableDish [i].childFood = food [i];
            prevFoodRemainAmount [i]    = food [i].remainFoodAmount;
        }

        statusNotices = new StatusNotice[food.Count];
        for (int i = 0; i < food.Count; i++)
        {
            statusNotices[i] = NoticeM.UseStaticNotice(food[i].remainFoodAmount.ToString(), food[i].socket.position);
        }
    }
예제 #7
0
    void StaffUse(Staff staff)
    {
        if (entryWaitingGuestGroup.Count <= 0)
        {
            return;
        }
        Table temTable = TableM.self.GetEmptyTable(entryWaitingGuestGroup.Peek().guestGroup.Count);

        // do not have table now
        // Need to wait more
        if (temTable != null)
        {
            staff.Guidance2Table(entryWaitingGuestGroup.Dequeue().guestGroup, temTable);
        }
        else
        {
            NoticeM.UseNotice("No Table", transform.position);
        }

        if (entryWaitingGuestGroup.Count <= 0)
        {
            cakeslice.OutlineAnimation.self.SetActive(false);
        }
    }
예제 #8
0
 void Awake()
 {
     self = this;
 }
예제 #9
0
 public void Say(string msg)
 {
     NoticeM.UseNotice(msg, transform);
 }
예제 #10
0
 void TakeFood(Person person)
 {
     NoticeM.UseNotice("음식가져감", transform.position);
     person.TakeFood(outFood);
     outFood = null;
 }