public static IEnumerator DeathCircles(Battler battler)
 {
     int circleCount = 25;
     Vector3 circlePos = battler.gameObject.transform.position;
     circlePos.y = battler.GetComponentInChildren<Renderer>().bounds.center.y;
     for (int i = 0; i < circleCount; i++)
     {
         Vector3 dir = Random.insideUnitSphere;
         Quaternion facing = Quaternion.LookRotation(dir);
         MonoBehaviour.Instantiate(DeathCirclePrefab, circlePos, facing);
         yield return new WaitForSeconds(0.08f);
     }
 }
Example #2
0
        public override IEnumerator Run(Battler user, Battler target, IList<Battler> allCharacters, IList<Battler> allEnemies, BattleController bc)
        {
            Animator anim = user.GetComponent<Animator>();
            anim.SetInteger("State", 3);
            yield return new WaitForSeconds(1.4f);
            int duration = 40;
            Material m = target.GetComponentInChildren<Renderer>().material;
            m.EnableKeyword("_EMISSION");

            SpecialEffectsManager.RestoreParticles(target);
            for (int i = 0; i < duration; i++)
            {
                m.SetColor("_EmissionColor", Color.white * 0.6f * Mathf.Sin((float) i / duration * Mathf.PI));
                yield return 0;
            }
            target.BattleBehavior.RestoreHP(user, 250);
            anim.SetInteger("State", 0);
            Debug.Log(user.BattleBehavior.Name + " restored 250 HP to " + target.BattleBehavior.Name);
        }
Example #3
0
    protected override IEnumerator Done(Battler battler)
    {
        yield return(base.Done(battler));

        battler.GetComponentInChildren <DamageDealerTrigger>().Disable();
    }