// Wander()
 // go in random directions
 public void Wander(float rx, float ry)
 {
     // pick a location near me
     // move towards it
     #region Get Nearest + Null Checks
     Checks.SetRandomPosition(rx, ry);
     Vector2 pos = Checks.GetSpecialPosition();
     #endregion
     if (Behaviour.MoveTo(pos, AiData.Speed, 1.0f))
     {
         Checks.ResetSpecials();
         Behaviour.ResetActionTimer();
     }
 }
Exemplo n.º 2
0
    protected void StopCharm()
    {
        // get protocols
        MonsterProtocols proto = characterData.getProtocol();
        MonsterChecks    check = characterData.getChecks();

        // no leader
        check.ResetSpecials();
        check.specialLeader = null;
        check.congaPosition = -1;
        // remove self from player's party
        PlayerController.instance.GetComponent <PlayerData>().party.Remove(gameObject);
        // initiate conga
        characterData.currentProtocol = AIData.Protocols.Lazy;

        Debug.Log("no longer CHARMED");
    }