private void Start() { if (SoundManager == null) { SoundManager = FindObjectOfType <SoundManagement>(); } }
private void Start() { if (gameFinishText.activeSelf == true) { gameFinishText.SetActive(false); } audioManager = SoundManagement.instance; }
private void Start() { if (_soundManager == null) { _soundManager = FindObjectOfType <SoundManagement>(); } _complexMove = GetComponent <ComplexMove>(); _npcMovement = GetComponent <NpcMovement>(); StartCoroutine(RotarChecking()); }
void Awake() //Function that checks that one scene have only one SoundManager { if (instance != null) { Debug.LogError("More than one SoundManager in the scene "); } else { instance = this; } }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } DontDestroyOnLoad(this.gameObject); }
void Awake() { if (instance != null && instance != this) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(gameObject); audioSource = GetComponent <AudioSource>(); }
public void SetCurrentValues() { if (SoundManager == null) { SoundManager = FindObjectOfType <SoundManagement>(); } EffectSounds.value = GlobalVariables.EffectSoundLevel; MusicSounds.value = GlobalVariables.MusicSoundLevel; InvertCamYCheckSign.isOn = GlobalVariables.IsCamYInverted; SoundManager.RaiseOrLowerMusicSounds(GlobalVariables.MusicSoundLevel); SoundManager.RaiseOrLowerEffectSounds(GlobalVariables.EffectSoundLevel); }
//Initialize Method of this class private void Init() { prefab_walls = Resources.Load("Prefabs/Walls") as GameObject; prefab_background = Resources.Load("Prefabs/Background") as GameObject; currentState = GameState.INIT; previousState = GameState.NULL; stageManagement = StageManagement.GetInstance(); playerManagement = PlayerManagement.GetInstance(); enemyManagement = EnemyManagement.GetInstance(); uiManagment = UIManagement.GetInstance(); itemManagement = ItemManagement.GetInstance(); scoreManagement = ScoreManagement.GetInstance(); soundManagement = SoundManagement.GetInstance(); StartCoroutine(CheckState()); }
private void Start() { health = Shop._curntHealth; Pdead = false; anim = GetComponent <Animator>(); //Audio audioManager = SoundManagement.instance; if (Shop.pistol == 0) { GameObject.Find("PlayerPistol").SetActive(false); GameObject.Find("PlayerShotGun").SetActive(true); } else { GameObject.Find("PlayerPistol").SetActive(true); GameObject.Find("PlayerShotGun").SetActive(false); } }
private void Start() { if (_soundManager == null) { _soundManager = FindObjectOfType <SoundManagement>(); } if (navMeshAgent == null) { navMeshAgent = transform.GetComponent <NavMeshAgent>(); } if (animator == null) { animator = transform.GetComponent <NpcDisplay>().NpcGameObject.GetComponent <Animator>(); } if (targetPoints.Count > 0) { EnqueueTargets(targetPoints); currentTarget = targetQueue.Dequeue(); } }
void Start() { audioManager = SoundManagement.instance; if (gameObject.CompareTag("Player")) { if (gameObject.name == "PlayerPistol") { _weapons = Gun.PlayerPistol; } if (gameObject.name == "PlayerShotGun") { _weapons = Gun.PlayerShotGun; } } if (gameObject.CompareTag("Enemy")) { if (gameObject.name == "EnemyPistol") { _weapons = Gun.EnemyPistol; } } }
void Start() { //Audio audioManager = SoundManagement.instance; //Imports Player stats from Container if (SceneManager.GetActiveScene().name == "Caveman") { _playerPar = PlayerStatContainer.Caveman; _aceleration = PlayerStatContainer.Caveman.PlayerSpeed; } else if (SceneManager.GetActiveScene().name == "Mystical Forest") { _playerPar = PlayerStatContainer.MysticalForest; _aceleration = PlayerStatContainer.MysticalForest.PlayerSpeed; } else if (SceneManager.GetActiveScene().name == "SampleScene") { _playerPar = PlayerStatContainer.SampleScene; _aceleration = PlayerStatContainer.SampleScene.PlayerSpeed; } }
private void Start() { if (_soundManager == null) { _soundManager = FindObjectOfType <SoundManagement>(); } if (navMeshAgent == null) { navMeshAgent = GetComponent <NavMeshAgent>(); } if (controller == null) { controller = GetComponent <CharacterController>(); } if (currentCamera == null) { currentCamera = Camera.main.transform; } if (animator == null) { animator = GetComponentInChildren <Animator>(); } }
private void Start() { audioManager = SoundManagement.instance; //Import AudioManager _isDeath = false; }
private void Awake() { instance = this; audioMaterial = GetComponent <AudioSource>(); }
private void Start() { IsDeath = false; audioManager = SoundManagement.instance; }