예제 #1
0
 // Use this for initialization
 void Start()
 {
     canvasRenderer = GetComponentInChildren <CanvasRenderer>();
     player         = GameObject.Find("Player");
     canvas         = GameObject.Find("Canvas");
     pickupManager  = GameObject.Find("Manager").GetComponent <ItemPickupManager>();
 }
예제 #2
0
 public static ItemPickupManager GetInstance()
 {
     if(_instance == null)
     {
         GameObject gameScreensObject = GameObject.Find("ItemPickupManager") as GameObject;
         _instance = gameScreensObject.GetComponent<ItemPickupManager>();
     }
     return _instance;
 }
예제 #3
0
    //public GameObject[] gunsToRandomlySpawn;

    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }
    }
예제 #4
0
    // 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);
    }