Beispiel #1
0
    public override void Think()
    {
        bool inRange = InAttackRange(TheCharacter.BasicAttackSkill);
        bool flight  = TheCharacter.GetHealthParam() <= FlightLimit;

        if (!inRange && !flight)
        {
            MoveToTarget();
        }
        else
        {
            if (flight)
            {
                MoveAwayFromTarget();
            }
            else
            {
                float aliveTime = Time.time - SpawnTime;
                if (aliveTime > TheCharacter.Initiative && TheCharacter.SkillUseable(TheCharacter.BasicAttackSkill) && UnityEngine.Random.value < Fercocity)
                {
                    TheCharacter.BasicAttack();
                }
                else
                {
                    TheCharacter.Move(Vector3.zero);
                }
            }
        }
    }
    public void PlayerOneMagicAttackWithNoDelay()
    {
        TheCharacter character = this.playerCharacters[0].GetComponent <TheCharacter>();

        character.magicCastDone = new TheCharacter.MagicCastDone(this.MagicCastDone);
        character.MagicCast();
        //character.GotHit();
    }
    public void MagicCastDone()
    {
        Debug.Log("MagicCastDone");

        TheCharacter enemyCharacter = this.enemyCharacters[0].GetComponent <TheCharacter>();

        enemyCharacter.GotHit();
        this.AddFx(enemyCharacter.gameObject);
    }
Beispiel #4
0
 public override void Think()
 {
     if (!InAttackRange(TheCharacter.BasicAttackSkill))
     {
         MoveToTarget();
     }
     else
     {
         float aliveTime = Time.time - SpawnTime;
         if (aliveTime > TheCharacter.Initiative && TheCharacter.SkillUseable(TheCharacter.BasicAttackSkill) && UnityEngine.Random.value < Fercocity)
         {
             TheCharacter.BasicAttack();
         }
         else
         {
             TheCharacter.Move(Vector3.zero);
         }
     }
 }