Example #1
0
    GameObject GenerateFighterObject(Vector3 position, Vector3 scale, FighterFightStatus fightStatus)
    {
        GameObject fighter = Instantiate<GameObject>(FighterPrefab);
        fighter.GetComponent<FighterScript>().reference = fightStatus;
        fighter.transform.parent = this.gameObject.transform;
        fighter.transform.localPosition = position;
        fighter.transform.localScale = scale;

        // Reset rotation, as it gets rotated for team stuff.
        fighter.transform.localRotation = new Quaternion();

        return fighter;
    }
Example #2
0
 void OnDefend(FighterFightStatus fighter, int amount)
 {
     StartCoroutine(DefendStance());
 }
Example #3
0
 void OnDeath(FighterFightStatus fighter)
 {
     Debug.Log(fighter.Info.Name + " has Died!!!");
     StopAllCoroutines();
     this.transform.localPosition = stepDead;
     KillColor();
 }
Example #4
0
 void OnDamage(FighterFightStatus fighter, int amount)
 {
     if (fighter.isAlive() && !fighter.IsAnimating)
     {
         StartCoroutine(DamageColor());
     }
 }
Example #5
0
 void OnCompleteAbility(FighterFightStatus fighter)
 {
 }
Example #6
0
 void OnActivateAbility(FighterFightStatus fighter)
 {
     //this.transform.localPosition = stepForward;
     if (fighter.isAlive() && !fighter.IsAnimating)
     {
         StartCoroutine(AnimateAttack());
         fighter.IsAnimating = true;
     }
 }