private void OnEnable() { audioHandler = GetComponent <ObjectAudioHandler>(); Ammo = 100; UpdateFillBar(); hasShot = false; }
private void OnEnable() { isTransition = false; quitPanel.gameObject.SetActive(false); canPressBtn = true; //Closed door 115.504 open door 24.249 selectId = 0; SetHover(); doorAnimation = doorHolder.GetComponent <Animator>(); audioHandler = GetComponent <ObjectAudioHandler>(); doorAnimation.enabled = false; if (usingToolTips == true) { toolTip.SetActive(true); } else if (usingToolTips == false) { toolTip.SetActive(false); } if (SoundManager.Instance != null) { SoundManager.Instance.PlayMainTheme(); } }
private void OnEnable() { Ammo = 100; UpdateFillBar(); bullets = GameObject.Find("BulletsSpawn").GetComponent <ObjectPooling>(); Debug.Log("fill bar reset"); audioHandler = GetComponent <ObjectAudioHandler>(); }
private void OnEnable() { Ammo = 100; UpdateFillBar(); DrawColor = GameObject.Find("GameManager").GetComponent <DrawColor>(); audioHandler = GetComponent <ObjectAudioHandler>(); canPlaySplat = true; }
private void OnEnable() { reloading = false; Ammo = 100; UpdateFillBar(); audioHandler = GetComponent <ObjectAudioHandler>(); canPlaySplat = true; Renderer _rend = gameObject.GetComponent <Renderer>(); switch (Player.skinId) { case (0): { _rend.material = gunMaterials[0]; break; } case (1): { _rend.material = gunMaterials[1]; break; } case (2): { _rend.material = gunMaterials[2]; break; } case (3): { _rend.material = gunMaterials[3]; break; } } }