Fire() public méthode

public Fire ( ) : void
Résultat void
Exemple #1
0
    private IEnumerator AgressiveFire()
    {
        yield return(new WaitForSeconds(secBeforeAgressiveFire));

        //tower.Fire(2);
        tower.Fire(1);
    }
Exemple #2
0
        public void Update(DemoTime time, Vector2 position)
        {
            base.Update(time);

            _towers.ForEach(delegate(CommonTower Tower)
            {
                Tower.Update(time);
            });

            _towers.ForEach(delegate(CommonTower Tower)
            {
                Tower.Fire(time, position);
            });
        }
Exemple #3
0
    // Update is called once per frame
    void Update()
    {
        //if (Input.GetMouseButtonDown(1))
        //activeTurret.Fire();
        if (Input.GetMouseButtonDown(0))
        {
            activeTurret.Fire();
        }
        //if (Input.GetMouseButtonUp(1))
        //activeTurret.Release(false);
        if (Input.GetMouseButtonUp(0))
        {
            activeTurret.Release(true);
        }

        if (!lockTurret)
        {
            if (Input.GetKeyDown(KeyCode.Alpha1) && turretHealth[0].IsAlive())
            {
                SetActiveTurret(1);
            }
            if (Input.GetKeyDown(KeyCode.Alpha2) && turretHealth[1].IsAlive())
            {
                SetActiveTurret(2);
            }
            if (Input.GetKeyDown(KeyCode.Alpha3) && turretHealth[2].IsAlive())
            {
                SetActiveTurret(3);
            }
            if (Input.GetKeyDown(KeyCode.Alpha4) && turretHealth[3].IsAlive())
            {
                SetActiveTurret(4);
            }
            if (Input.GetKeyDown(KeyCode.Alpha5) && turretHealth[4].IsAlive())
            {
                SetActiveTurret(5);
            }
        }
    }
Exemple #4
0
 public static Projectile GetTowerProjectile(Tower tower, Creep target)
 {
     return(new Projectile(tower.Fire(), target, tower.Position, tower.Type));
 }
 public static Projectile GetTowerProjectile(Tower tower, Creep target)
 {
     return new Projectile(tower.Fire(), target, tower.Position, tower.Type);
 }