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); }
public override void OnExit(Phenix.Unity.AI.WorldState ws) { if (_eventAttackRoll != null) { _eventAttackRoll.Release(); _eventAttackRoll = null; } base.OnExit(ws); }
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]); }
public override void Reset() { base.Reset(); _eventAttackRoll = null; }