/// <summary> /// Prepares the game. /// </summary> void Start() { StopAllCoroutines(); mainCam = Camera.main; wiimoteController = GetComponent <C_Wiimote>(); followingPosition = Input.mousePosition; wMod = FindObjectOfType <C_WeaponMod>(); hSoundHandlerMainMusic = CustomSoundManager.Instance.PlaySound(Camera.main.gameObject, "Drone_Ambiant", true, 0.5f); //CustomSoundManager.Instance.PlaySound(Camera.main.gameObject, "Turbine_Ambiant", true, 1f); }
// Start is called before the first frame update void Start() { Instance = this; //UiCurrentPreset = StockPresets[CurrentIndex]; //hCurrentWeapon = UiPrimaryWeapon.gameObject; WeaponReady.SetActive(bDisplayChangeWeaponUI); UiWeaponIcon.gameObject.SetActive(bDisplayChangeWeaponUI); Cursor.visible = false; mainController = GetComponent <C_Main>(); LoadBarOrb.gameObject.transform.SetParent(hCrossHairCircle.transform); LoadBarSpecialMun.gameObject.transform.SetParent(hCrossHairCircle.transform); LoadOrbColorBase = LoadBarOrb.transform.GetChild(1).GetComponentInChildren <Image>().color; LoadMunColorBase = LoadBarSpecialMun.transform.GetChild(1).GetComponentInChildren <Image>().color; fxManager = GetComponent <C_Fx>(); weaponModsManager = FindObjectOfType <C_WeaponMod>(); Vector2 vHealthCur = GameObject.FindObjectOfType <C_Player>().GetLife(); LifeMax = vHealthCur.y; CurrentLife = vHealthCur.x; LifeFeedback = vHealthCur.x; }