Example #1
0
    // 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;
    }
Example #2
0
 void Awake()
 {
     _instance = this;
 }