private void Start()
 {
     Level = FindObjectOfType <LevelScript>();
     ThePlayer.transform.position = new Vector3(-Toolbox.TileSizeX / 2f, 0f, ThePlayer.transform.position.z);
     _caveHandler      = FindObjectOfType <CaveHandler>();
     _villageSequencer = GameObject.FindGameObjectWithTag("Scripts").AddComponent <VillageSequencer>();
     StartCoroutine("LoadSequence");
 }
示例#2
0
 private void Awake()
 {
     _caveZPos    = Toolbox.Instance.ZLayers["Cave"];
     _caveParent  = GameObject.Find("Caves").GetComponent <Transform>();
     _caveHandler = FindObjectOfType <CaveHandler>();
     SetupCaveEnds();
     SetupCavePool();
 }
示例#3
0
    private void Awake()
    {
        var caveObject = new GameObject("Caves");

        _cave = caveObject.AddComponent <CaveHandler>();

        _shrooms  = new ShroomPool();
        _stals    = new StalPool();
        _moths    = new MothPool();
        _spiders  = new SpiderPool();
        _webs     = new WebPool();
        _triggers = new TriggerHandler();
        _npcs     = new NPCPool();
    }