예제 #1
0
 void SendEvent()
 {
     _eventAttackRoll                = AnimFSMEventAttackRoll.pool.Get();
     _eventAttackRoll.target         = Agent.BlackBoard.HasAttackTarget ? Agent.BlackBoard.desiredTarget : null;
     _eventAttackRoll.animAttackData = Agent.AnimSet.ProcessCombo(ComboType.ATTACK_ROLL);
     Agent.FSMComponent.SendEvent(_eventAttackRoll);
 }
예제 #2
0
 public override void OnExit(Phenix.Unity.AI.WorldState ws)
 {
     if (_eventAttackRoll != null)
     {
         _eventAttackRoll.Release();
         _eventAttackRoll = null;
     }
     base.OnExit(ws);
 }
예제 #3
0
    protected override void Initialize(FSMEvent ev)
    {
        _eventAttackRoll = ev as AnimFSMEventAttackRoll;

        _state = AttackRollState.PREPARE;
        AnimationTools.PlayAnim(Agent.AnimEngine, "attackRollStart", 0.4f);
        base.Initialize(_eventAttackRoll);
        Agent.BlackBoard.motionType = MotionType.NONE;
        _endOfStateTime             = Agent.AnimEngine["attackRollStart"].length * 0.95f + Time.timeSinceLevelLoad;
        _hitTimer = 0;
        UpdateFinalRotation();
        //Agent.SoundPlay(Agent.RollSounds[0]);
    }
예제 #4
0
 public override void Reset()
 {
     base.Reset();
     _eventAttackRoll = null;
 }