예제 #1
0
    /// <summary>
    /// create references to the needed scripts and collects data where n eeded on startup
    /// </summary>
    private void Awake()
    {
        GetBounds();
        GameObject tGameobject = GameObject.FindGameObjectWithTag("GameData");

        _gameData   = tGameobject.GetComponent <GameData>();
        _itemSpawer = ItemSpawer.Instance;
    }
예제 #2
0
    /// <summary>
    /// Sets variables
    /// </summary>
    private void Awake()
    {
        handTransform = transform;
        GameObject tGameobject = GameObject.FindGameObjectWithTag("GameData");

        _gameData    = tGameobject.GetComponent <GameData>();
        tGameobject  = GameObject.FindGameObjectWithTag("ItemSpawner");
        _itemSpawner = tGameobject.GetComponent <ItemSpawer>();
    }