示例#1
0
    public void DonePlaying()
    {
        Debug.Log("DONE");
        if (queue.Count <= 1)
        {
            Debug.Log("Machiin avava");
            arcade.SetArcadeMachineAvailable(this);
            isOccupied = false;
        }
        else
        {
            Customer c = queue[0];
            queue.Remove(c);
            c.MoveToMachine(this);
            user = c;

            int spot = 1;
            queue.ForEach(customer => {
                Vector3 p = playingArea.transform.position;
                Vector3 d = (-playingArea.transform.forward * 1f) * spot;
                customer.MoveInQueue(new Vector3(p.x + d.x, p.y + d.y, p.z + d.z));
                spot++;
            });
        }
    }