Example #1
0
        void Update()
        {
            timer += Time.deltaTime;

            if (timer >= Stats.AttackSpeed && Stats.CurrentHealth > 0 && !(Mov.BuildingDead()))            //building in range deh asdy 3aleha ya2ema building f 7alet el enemies el ranged ya2ema enemies in range to apply effects
            {
                Spawn();
            }
        }
Example #2
0
        void Update()
        {
            timer += Time.deltaTime;
            //Debug.Log (Mov.BuildingInRange ());
            if (timer >= Stats.AttackSpeed && Mov.BuildingInRange() && Stats.CurrentHealth > 0 && !(Mov.BuildingDead()))
            {
                Shoot();
            }            //Debug.Log (anim.tag)

            if (timer >= Stats.AttackSpeed * effectsDisplayTime)
            {
                DisableEffects();
            }
        }