// Use this for initialization void Start() { canvasRenderer = GetComponentInChildren <CanvasRenderer>(); player = GameObject.Find("Player"); canvas = GameObject.Find("Canvas"); pickupManager = GameObject.Find("Manager").GetComponent <ItemPickupManager>(); }
public static ItemPickupManager GetInstance() { if(_instance == null) { GameObject gameScreensObject = GameObject.Find("ItemPickupManager") as GameObject; _instance = gameScreensObject.GetComponent<ItemPickupManager>(); } return _instance; }
//public GameObject[] gunsToRandomlySpawn; private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
// Use this for initialization void Start() { player = GameObject.Find("Player"); health = player.GetComponent <PlayerHealth>(); controller = player.GetComponent <PlayerController>(); canvasRenderer = GetComponentInChildren <CanvasRenderer>(); pickupManager = GameObject.Find("Manager").GetComponent <ItemPickupManager>(); audioManager = player.GetComponent <PlayerAudioManager>(); levelManager = GameObject.Find("Manager").GetComponent <LevelManager>(); amount = (int)(amount * levelManager.floorNumber); }