private void Start() { ReloadTime = 0; target = null; turret = new StandardTurret(); InvokeRepeating("UpdateTarget", 0f, 0.5f); }
protected virtual void Start() { turret = transform.parent.GetComponent <StandardTurret>(); target = turret.target; damage = turret.damage; speed = turret.bulletSpeed; bulletImpactEffect = turret.bulletImpactEffect; }
public GameClass() { MainBase = new BaseBuilding(100); standardTurretTemp = new StandardTurret(); missleLuncherTemp = new MissleTurret(); LaserTurretTemp = new LaserTurret(); kills = 0; score = 0; coins = 500; wavesPassed = 0; startlives = 50; Lives = startlives; }
/* Start * * sets a bunch of text * */ void Start() { Debug.Log("here"); t = g.GetComponent <Turret>(); // if laser turret - set text accordingly LaserBeamer l = g.GetComponent <LaserBeamer>(); if (l != null) { damageOverTime.text = "Damage Over Time: " + l.damageOverTime; slowRate.text = "Slow Rate: " + l.slowAmount; range.text = "Range: " + l.range; } else { StandardTurret s = g.GetComponent <StandardTurret>(); range.text = "Range: " + s.range; damage.text = "Damage: " + s.bulletPrefab.GetComponent <Bullet>().damage; // sets fire rate if (fireRate != null) { if (s.fireRate == 1) { fireRate.text = "Fire Rate: " + s.fireRate + " bullet per second"; } else { fireRate.text = "Fire Rate: " + s.fireRate + " bullets per second"; } } // if missile launcher if (explosionRadius != null) { explosionRadius.text = "Explosion Radius: " + s.bulletPrefab.GetComponent <Missile>().explosionRadius; } // if poison turret if (poison != null) { poison.text = "Poison rate: " + s.bulletPrefab.GetComponent <PoisonBullet>().poison; } } }