Example #1
0
 // Start is called before the first frame update
 void Awake()
 {
     COI   = GameObject.FindGameObjectWithTag("CarryOverInventory").GetComponent <CarryOverInventory>();
     SS    = GameObject.FindGameObjectWithTag("Player").GetComponent <SlotSelection>();
     inv   = GameObject.FindGameObjectWithTag("Inventory").GetComponent <Inventory>();
     pause = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Pause>();
 }
 void Awake()
 {
     //DontDestroyOnLoad
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
Example #3
0
    void Awake()
    {
        SS = GameObject.FindGameObjectWithTag("Player").GetComponent <SlotSelection>();

        try
        {
            COI = GameObject.FindGameObjectWithTag("CarryOverInventory").GetComponent <CarryOverInventory>();
        }
        catch
        {
            COI = null;
        }
    }
Example #4
0
    void Awake()
    {
        PS  = pistol.GetComponent <PlayerShooting>();
        UCI = GameObject.FindGameObjectWithTag("Player").GetComponent <UseConsumableItem>();

        try
        {
            CCO = GameObject.FindGameObjectWithTag("CarryOverInventory").GetComponent <CarryOverInventory>();
        }
        catch
        {
            CCO = null;
        }
    }