コード例 #1
0
 protected virtual void AdditionalUpdateFunction()
 {
     //Make the special skill countdown correctly
     UpdateSpecialCountDown();
     //Regen the object's health.
     RegenHealth();
     //update animator wrapper to make animation run correctly
     animatorWrapper.DoUpdate();
     //update the renderer because of things....
     objectRenderer.DoUpdateRenderer();
 }
コード例 #2
0
    public virtual void DoUpdate()
    {
        switch (objectState)
        {
        case ObjectState.Idle:
            idleCountDown--;
            if (idleCountDown <= 0)
            {
                idleCountDown = 10;
                if (objectManager.RequestTarget(this) != null)
                {
                    ChargeAtObject(objectManager.RequestTarget(this));
                }
            }

            break;

        case ObjectState.Run:
            ObjectRunning();
            break;

        case ObjectState.Charge:
            ObjectCharging();
            break;

        case ObjectState.Attack:
            ObjectAttack();
            break;

        case ObjectState.Stun:
            break;

        case ObjectState.Die:
            //when hero die, should countdown or do something
            WhileHeroDie();
            break;
        }

        animatorWrapper.DoUpdate();
    }