Exemplo n.º 1
0
    /// <summary>
    /// ゴール地点頭達時
    /// </summary>
    public void EndPosComplate()
    {
        Debug.Log("EndComplete");

        if (!GateInHuman)
        {
            if (humanLines.Count == 0)
            {
                return;
            }
            GateInHuman = humanLines.Dequeue();
        }
        GateInHuman.GetComponent <HumanMove>().GotoOutScreen();
        isMoveNow = false;

        //Dequeue
        //HumanInfo breakInfo = humanLines.Dequeue();
        // 次の人がいたら、その人をStartさせる
        if (humanLines.Count > 0)
        {
            HumanInfo firstInfo = humanLines.Peek();
            firstHuman = GateInHuman.gameObject;
            firstInfo.GetComponent <HumanMove>().GotoStartPoss(() => StartPosComplate());
        }
        GateInHuman = null;
    }
Exemplo n.º 2
0
 private void GateIn()
 {
     StartCoroutine(TicketGate.instance.WaitTicketTiming(() =>
     {
         if (humanLines.Count > 0 && !humanLines.Peek().GetComponent <HumanMove>().isGateStart)
         {
             return;
         }
         if (!GateInHuman && humanLines.Count == 0)
         {
             return;
         }
         GateInHuman = humanLines.Dequeue();
         firstHuman  = GateInHuman.gameObject;
         //firstInfo.GetComponent<HumanMove>().GotoEndPos(() => EndPosComplate());
         GateInHuman.GetComponent <HumanMove>().GotoEndPos(() => { });
         isMoveNow = true;
     }));
 }