Esempio n. 1
0
        protected override void Update()
        {
            base.Update();
            if (withinRange())
            {
                Teleport teleport = (Teleport)this.GetSpell("Teleport");
                teleport.SetLocation(targetPosition);
                teleport.Cast();

                TimerCount = true;
            }
            if (TimerCount == true)
            {
                timer += Time.deltaTime;
            }
            if (timer > 1)
            {
                Explosion explosion = (Explosion)this.GetSpell("Explosion");
                explosion.SetBody(targetBody);
                explosion.Cast();
            }
        }