Exemplo n.º 1
0
 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;
 }
Exemplo n.º 3
0
 public override void OnEnter(Base_Ghost ghost)
 {
     LocalRageTime    = ghost.RageTime;
     LocalSpeed       = ghost.speed;
     RageSpeed        = ghost.speed + 2f;
     ghost.KillGhost  = true;
     ghost.KillPlayer = true;
 }
Exemplo n.º 4
0
    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");
        }
    }
Exemplo n.º 6
0
    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");
        }
    }
Exemplo n.º 7
0
    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;
 }
Exemplo n.º 10
0
 public override void OnExit(Base_Ghost ghost)
 {
     ghost.speed = LocalSpeed;
     ghost.NewRoute();
     ghost.KillPlayer = true;
 }
Exemplo n.º 11
0
 public abstract void OnUpdate(Base_Ghost ghost);
Exemplo n.º 12
0
 public override void OnExit(Base_Ghost ghost)
 {
     ghost.KillGhost  = false;
     ghost.KillPlayer = false;
     ghost.speed      = LocalSpeed;
 }
Exemplo n.º 13
0
 public override void OnEnter(Base_Ghost ghost)
 {
     ghost.RescueGhost = true;
 }
Exemplo n.º 14
0
 public override void OnExit(Base_Ghost ghost)
 {
     ghost.KillPlayer  = false;
     ghost.RescueGhost = false;
 }
Exemplo n.º 15
0
 public abstract void OnExit(Base_Ghost ghost);
 public override void OnUpdate(Base_Ghost ghost)
 {
 }
 public override void OnEnter(Base_Ghost ghost)
 {
 }
Exemplo n.º 18
0
 public abstract void OnEnter(Base_Ghost ghost);