public override void OnEnter(Base_Ghost ghost) { LocalFleeTime = ghost.IdleTime; ghost.KillPlayer = false; LocalSpeed = ghost.speed; ghost.speed += 2; }
public override void OnExit(Base_Ghost ghost) { localtaggedTime = ghost.TaggedTime; ghost.myHealth = 1; ghost.GotRescuedGhost = false; ghost.InFleeZone = false; }
public override void OnEnter(Base_Ghost ghost) { LocalRageTime = ghost.RageTime; LocalSpeed = ghost.speed; RageSpeed = ghost.speed + 2f; ghost.KillGhost = true; ghost.KillPlayer = true; }
public override void OnUpdate(Base_Ghost ghost) { float distance = Vector3.Distance(ghost.transform.position, ghost.player.transform.position); ghost.KillPlayer = true; ghost.myMat.SetColor("_Color", Color.blue); if (distance < EnemyDistance) { Vector3 dirToPlayer = ghost.transform.position - ghost.player.transform.position; Vector3 newPos = ghost.transform.position - dirToPlayer; PathRequestManager.RequestPath(ghost.transform.position, ghost.player.transform.position, ghost.OnPathFound); } else { PathRequestManager.RequestPath(ghost.transform.position, ghost.target.transform.position, ghost.OnPathFound); } }
public override void OnUpdate(Base_Ghost ghost) { PathRequestManager.RequestPath(ghost.transform.position, ghost.spawn.transform.position, ghost.OnPathFound); ghost.myMat.SetColor("_Color", Color.green); if (ghost.GotRescuedGhost == true) { ghost.ChangeState("Patrol"); } if (ghost.InFleeZone == true) { localtaggedTime -= Time.deltaTime; } if (localtaggedTime <= 0) { ghost.ChangeState("Patrol"); } }
public override void OnUpdate(Base_Ghost ghost) { LocalRageTime -= Time.deltaTime; ghost.myMat.SetColor("_Color", Color.red); float distance = Vector3.Distance(ghost.transform.position, ghost.player.transform.position); PathRequestManager.RequestPath(ghost.transform.position, ghost.player.transform.position, ghost.OnPathFound); if (distance < EnemyDistance) { ghost.speed = RageSpeed; } else { ghost.speed = LocalSpeed; } if (LocalRageTime <= 0) { ghost.ChangeState("Flee"); } }
public override void OnUpdate(Base_Ghost ghost) { LocalFleeTime -= Time.deltaTime; float distance = Vector3.Distance(ghost.transform.position, ghost.player.transform.position); ghost.myMat.SetColor("_Color", Color.yellow); if (LocalFleeTime <= 0) { ghost.ChangeState("Patrol"); } if (distance < EnemyDistance) { Vector3 dirToPlayer = ghost.transform.position - ghost.player.transform.position; Vector3 newPos = ghost.transform.position + dirToPlayer; PathRequestManager.RequestPath(ghost.transform.position, dirToPlayer, ghost.OnPathFound); } else { PathRequestManager.RequestPath(ghost.transform.position, ghost.transform.position, ghost.OnPathFound); } }
public override void OnExit(Base_Ghost ghost) { }
public override void OnEnter(Base_Ghost ghost) { localtaggedTime = ghost.TaggedTime; }
public override void OnExit(Base_Ghost ghost) { ghost.speed = LocalSpeed; ghost.NewRoute(); ghost.KillPlayer = true; }
public abstract void OnUpdate(Base_Ghost ghost);
public override void OnExit(Base_Ghost ghost) { ghost.KillGhost = false; ghost.KillPlayer = false; ghost.speed = LocalSpeed; }
public override void OnEnter(Base_Ghost ghost) { ghost.RescueGhost = true; }
public override void OnExit(Base_Ghost ghost) { ghost.KillPlayer = false; ghost.RescueGhost = false; }
public abstract void OnExit(Base_Ghost ghost);
public override void OnUpdate(Base_Ghost ghost) { }
public override void OnEnter(Base_Ghost ghost) { }
public abstract void OnEnter(Base_Ghost ghost);