void Start() { projectiles = GameObject.Find("_EnemyBulletPool").GetComponent <ObjectPoolerWorld>(); _nextFireTime = Time.time + fireRate; _eController = GetComponent <EnemyController>(); //gunType = Random.Range(0,2); }
void Start() { _thisTransform = transform; _groundObjectPool = GameObject.Find("_GroundObjects").GetComponent <ObjectPoolerWorld>(); _grassObjectPool = GameObject.Find("_GrassObjects").GetComponent <ObjectPoolerWorld>(); _spikeObjectPool = GameObject.Find("_SpikeObjects").GetComponent <ObjectPoolerWorld>(); _player = GetComponent <Player>(); _curGenerationPos = startOffset; _couldParticles = new ParticleSystem.Particle[cloudSystem.maxParticles]; }
void Start() { if (Application.loadedLevelName == "LevelEditor") { this.enabled = false; if (useGunner) { GetComponent <Gunner>().enabled = false; } return; } if (renderer.materials[1]) { renderer.materials[1] = null; } _unitStats = GetComponent <UnitStats>(); health = _unitStats.health; _bulletPool = GameObject.Find("_EnemyBulletPool").GetComponent <ObjectPoolerWorld>(); _nextFireTime = Time.time + _unitStats.fireRate; }