Exemple #1
0
    public override void onStartRide()
    {
        foreach (motor m in motors)
        {
            m.GetAxis(this.gameObject);
        }

        base.onStartRide();
        foreach (motor m in motors)
        {
            m.Enter();
        }
        if (phases.Count <= 0)
        {
            animating = false;
            return;
        }
        foreach (motor m in motors)
        {
            m.Enter();
        }

        animating            = true;
        phaseNum             = 0;
        currentPhase         = phases[phaseNum];
        currentPhase.running = true;
        currentPhase.Enter();
        currentPhase.Run();
    }
    public override void onStartRide()
    {
        foreach (motor m in motors)
        {
            m.GetAxis(this.gameObject);
        }

        base.onStartRide();
        foreach (motor m in motors)
        {
            m.Enter();
        }
        if (phases.Count <= 0)
        {
            animating = false;
            return;
        }
        foreach (motor m in motors)
        {
            m.Enter();
        }

        animating = true;
        phaseNum = 0;
        currentPhase = phases[phaseNum];
        currentPhase.running = true;
        currentPhase.Enter();
        currentPhase.Run();
    }
Exemple #3
0
    public void EnterPhase(Type newPhase)
    {
        _currentPhase?.Exit();

        var paramArray = new object[] { _game, (Action <Type>)EnterPhase };

        _currentPhase = (Phase)Activator.CreateInstance(newPhase, paramArray);
        _currentPhase.Enter();
    }
Exemple #4
0
 void NextPhase()
 {
     currentPhase.Exit();
     currentPhase.running = false;
     phaseNum++;
     if (phases.Count > phaseNum)
     {
         currentPhase         = phases[phaseNum];
         currentPhase.running = true;
         currentPhase.Enter();
         currentPhase.Run();
         return;
     }
     animating = false;
 }
Exemple #5
0
 void NextPhase()
 {
     currentPhase.Exit();
     currentPhase.running = false;
     phaseNum++;
     if (phases.Count > phaseNum)
     {
         currentPhase         = phases[phaseNum];
         currentPhase.running = true;
         currentPhase.Enter();
         currentPhase.Run();
         return;
     }
     Debug.Log("-=====[Stopped]=====-");
     animating = false;
 }
    void NextPhase()
    {

        currentPhase.Exit();
        currentPhase.running = false;
        phaseNum++;
        if (phases.Count > phaseNum)
        {
            currentPhase = phases[phaseNum];
            currentPhase.running = true;
            currentPhase.Enter();
            currentPhase.Run();
            return;
        }
        animating = false;

    }
Exemple #7
0
    void NextPhase()
    {

        currentPhase.Exit();
        currentPhase.running = false;
        phaseNum++;
        if (phases.Count > phaseNum)
        {
            currentPhase = phases[phaseNum];
            currentPhase.running = true;
            currentPhase.Enter();
            currentPhase.Run();
            return;
        }
        Debug.Log("-=====[Stopped]=====-");
        animating = false;

    }