예제 #1
0
 public override void SummonTaskChange(FCCommand.CMD cmd)
 {
     if (cmd == FCCommand.CMD.STATE_ENTER)
     {
         AttackBase ab = _owner.ACGetAttackByName("SummonBiont");
         if (ab != null)
         {
             //single attackbase used for other state ,should not have attack conditions
             ab.AttCons = null;
         }
         _currentAttack = ab;
         ab.Init(this);
         ab.AttackEnter();
         AniEventAniIsOver    = _currentAttack.AniIsOver;
         _timeForIdleThisTime = 2.0f;
     }
     else if (cmd == FCCommand.CMD.STATE_UPDATE)
     {
         if (_currentAttack != null)
         {
             _currentAttack.AttackUpdate();
         }
     }
     else if (cmd == FCCommand.CMD.STATE_DONE)
     {
         ActionSummonBiont();
         SetNextState(AIAgent.STATE.IDLE);
     }
 }
예제 #2
0
    public override void LevelUpTaskChange(FCCommand.CMD cmd)
    {
        if (cmd == FCCommand.CMD.STATE_ENTER)
        {
            SetActionSwitchFlag(FC_ACTION_SWITCH_FLAG.IN_SUPER_SAIYAJIN);
            SetActionSwitchFlag(FC_ACTION_SWITCH_FLAG.IN_RIGIDBODY2);

            AttackBase ab = _owner.ACGetAttackByName("LevelUp");
            if (ab != null)
            {
                //single attackbase used for other state ,should not have attack conditions
                ab.AttCons = null;
            }
            if (_hasSuperArmor)
            {
                _superArmor.SetArmor(FCConst.SUPER_ARMOR_LVL1, _armorAddAfterRage);
            }
            _currentAttack = ab;
            ab.Init(this);
            ab.AttackEnter();
            AniEventAniIsOver = _currentAttack.AniIsOver;
        }
        else if (cmd == FCCommand.CMD.STATE_UPDATE)
        {
            if (_currentAttack != null)
            {
                _currentAttack.AttackUpdate();
            }
        }
        else if (cmd == FCCommand.CMD.STATE_DONE)
        {
            GoToAttack();
        }
        else if (cmd == FCCommand.CMD.STATE_QUIT)
        {
            _currentAttack.AttackQuit();
            _currentAttack    = null;
            AniEventAniIsOver = AniIsOver;
            ClearActionSwitchFlag(FC_ACTION_SWITCH_FLAG.IN_SUPER_SAIYAJIN);
            ClearActionSwitchFlag(FC_ACTION_SWITCH_FLAG.IN_RIGIDBODY2);
        }
    }