// 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; }
void Awake() { _instance = this; }