Beispiel #1
0
        public override void Launch()
        {
            Destroy(spellIndicator);
            spellIndicator = null;
            unit.GetComponent <UnitStatusManager>().UnRegisterStatus(rootStatus);
            if (rootStatus != null)
            {
                rootStatus.OnStatusEnd(unit.GetComponent <Unit>());
                rootStatus = null;
            }
            unit.GetComponentInChildren <Animator>().SetBool("FireRoot", false);
            base.Launch();
            int projectileCount = (int)Mathf.Clamp(castTime / chargeTime, 1f, maxCharge);

            for (int i = 0; i < projectileCount; i++)
            {
                Invoke("SpawnProjectile", (float)i * 0.1f);
            }
            Invoke("Effect", (float)projectileCount * 0.1f);
        }
Beispiel #2
0
 protected override void Update()
 {
     if (jumpTimer > 0f)
     {
         jumpTimer -= Time.deltaTime;
         if (jumpTimer < 0f)
         {
             if (rootStatus != null)
             {
                 rootStatus.OnStatusEnd(unit.GetComponent <Unit>());
                 rootStatus = null;
             }
             if (phaseStatus != null)
             {
                 phaseStatus.OnStatusEnd(unit.GetComponent <Unit>());
                 phaseStatus = null;
             }
             unit.GetComponent <Rigidbody>().velocity = new Vector3(0f, 0f, 0f);
             Clean();
         }
     }
 }