public static MeleeAttackState Create(StateBlackboard blackboard, Animator animator, NavMeshAgent navAgent, MeleeAttackData[] meleeAttacks, Transform transform, BlackboardKey attackRangeKey, BlackboardKey attackTriggerKey, SetAnimTriggerAction walkAction, int priority) { SetMeleeAttackAction setMeleeAttackAction = new SetMeleeAttackAction(blackboard, meleeAttacks); MoveToTargetAction moveToTargetAction = new MoveToTargetAction(blackboard, navAgent, attackRangeKey); LookAtTargetAction lookAtAction = new LookAtTargetAction(blackboard, transform); SetAnimTriggerAction attackAction = new SetAnimTriggerAction(blackboard, animator, attackTriggerKey, true); return(new MeleeAttackState(blackboard, setMeleeAttackAction, walkAction, moveToTargetAction, lookAtAction, attackAction, priority)); }
public PlayerAttackState(StateBlackboard blackboard, SetAnimTriggerAction setAttackTrigger, SetAnimTriggerAction setNextAttackTrigger, LookAtTargetAction lookAtAction, int priority = 0, bool repeatable = false) : base(blackboard, priority, repeatable) { this.setAttackTrigger = setAttackTrigger; this.setNextAttackTrigger = setNextAttackTrigger; this.lookAtAction = lookAtAction; }
public MeleeAttackState(StateBlackboard blackboard, SetMeleeAttackAction setMeleeAttackAction, SetAnimTriggerAction walkAction, MoveToTargetAction moveToAction, LookAtTargetAction lookAtAction, SetAnimTriggerAction attackAction, int priority = 0, bool repeatable = false) : base(blackboard, priority, repeatable) { actions.Add(setMeleeAttackAction); actions.Add(walkAction); actions.Add(moveToAction); actions.Add(lookAtAction); actions.Add(attackAction); }
public RangedAttackState(StateBlackboard blackboard, SetAnimTriggerAction idleAction, TimerAction timerAction, SetRandomDestinationAction destinationAction, SetAnimTriggerAction runAction, MoveToDestinationAction moveToAction, SetSkillAction setSkillAction, LookAtTargetAction lookAtAction, SetAnimTriggerAction attackAction, int priority = 0, bool repeatable = false) : base(blackboard, priority, repeatable) { actions.Add(idleAction); actions.Add(timerAction); actions.Add(destinationAction); actions.Add(runAction); actions.Add(moveToAction); actions.Add(setSkillAction); actions.Add(lookAtAction); actions.Add(attackAction); }