public override void Enter(LittleBossAgent agent) { agent.GetRigidbody().velocity = Vector3.zero; agent.GetNavMeshAgent().isStopped = true; agent.SetAnimation(true); agent.ResetAttack(); agent.Attack(); }
public override void Update(LittleBossAgent agent) { if (agent.GetDistanceBtwPlayerAndReturn() < agent.GetRange()) { Debug.Log("Player is in reach"); agent.SetState(LittleBossFollowPlayerState.GetInstance()); } }
public override void Update(LittleBossAgent agent) { //Debug.Log(Vector3.Distance(agent.GetDestination(), agent.transform.position)); if (Vector3.Distance(agent.GetDestination(), agent.transform.position) < 0.5f) { agent.SetState(LittleBossIdleState.GetInstance()); } }
public override void Update(LittleBossAgent agent) { agent.SetPlayerAsDestination(); Debug.Log("Player still in reach"); if (Vector3.Distance(agent.GetDestination(), agent.transform.position) < agent.GetAttackRange()) { Debug.Log("Attack"); agent.SetState(LittleBossAttackState.GetInstance()); } if (agent.GetDistanceBtwPlayerAndReturn() > agent.GetRange()) { Debug.Log("Return"); agent.SetState(LittleBossReturnState.GetInstance()); } }
public override void Update(LittleBossAgent agent) { agent.SetPlayerAsDestination(); if (agent.GetDistanceBtwPlayerAndReturn() > agent.GetRange()) { agent.SetState(LittleBossReturnState.GetInstance()); } else if (Vector3.Distance(agent.transform.position, agent.GetDestination()) > agent.GetAttackRange()) { agent.SetState(LittleBossFollowPlayerState.GetInstance()); } else if (agent.GetCurrentTimeBtwAttacks() < 0) { agent.SetState(GetInstance()); } else { agent.UpdateAttackTime(); } //insert EXPLOSION!! }
public override void Exit(LittleBossAgent agent) { }
public override void Enter(LittleBossAgent agent) { agent.ActivateMoving(); agent.SetPlayerAsDestination(); }
public override void Exit(LittleBossAgent agent) { agent.GetNavMeshAgent().isStopped = false; agent.SetAnimation(false); }
public abstract void Exit(LittleBossAgent agent);
public abstract void Update(LittleBossAgent agent);
public abstract void Enter(LittleBossAgent agent);
public override void Enter(LittleBossAgent agent) { agent.DeactivateMoving(); }
public override void Enter(LittleBossAgent agent) { agent.ResetDestination(); }