void Start() { weaponSfx = GetComponent <WeaponSFX>(); foreach (ProjectilePool projectilePool in projectilePools) { projectileStacks.Add(new Stack <GameObject>(projectilePool.projectiles)); } }
private void Awake() { Debug.Log("Weapon Awake"); weaponUI = GetComponent <WeaponUI>(); weaponSFX = GetComponent <WeaponSFX>(); weaponGFXgameObject = transform.Find("GFX").gameObject; weaponUIgameObject = transform.Find("Canvas").gameObject; //Enable UI and Disable GFX weaponUIgameObject.SetActive(true); weaponGFXgameObject.SetActive(false); timeLeftToSpawn = weaponDetails.timeToConstruct; currentShootRate = weaponDetails.shootRate; //ADD GIZMO gameObject.AddComponent <WeaponGizmo>().radius = weaponDetails.weaponRadius; }
private void Start() { flash = transform.Find("Flash").gameObject; sfx = GetComponent <WeaponSFX>(); }