コード例 #1
0
ファイル: DungeonUtil.cs プロジェクト: r3c0d3/planetexplorers
 /// <summary>
 /// Adds the locked door to dungeon.
 /// </summary>
 public static void AddLockedDoorToDungeon(Dungeon dungeon, GameObject doorPrefab, Doorway doorway)
 {
     dungeon.LockedDoorList.Add(doorPrefab.GetComponent <LockedDoor>());
 }
コード例 #2
0
        internal TilePlacementData(PreProcessTileData preProcessData, bool isOnMainPath, DungeonArchetype archetype, TileSet tileSet, Dungeon dungeon)
        {
            root = (GameObject)GameObject.Instantiate(preProcessData.Prefab);

            Bounds       = preProcessData.Proxy.GetComponent <Collider>().bounds;
            IsOnMainPath = isOnMainPath;

            tile = Root.GetComponent <Tile>();

            if (tile == null)
            {
                tile = Root.AddComponent <Tile>();
            }

            tile.Placement = this;
            tile.Archetype = archetype;
            tile.TileSet   = tileSet;
            tile.Dungeon   = dungeon;

            foreach (var doorway in Root.GetComponentsInChildren <Doorway>(true))
            {
                doorway.Dungeon = dungeon;
                doorway.Tile    = tile;
                AllDoorways.Add(doorway);
            }

            UnusedDoorways.AddRange(AllDoorways);
        }
コード例 #3
0
 void Start()
 {
     instance    = this;
     gameManager = GameManager.instance;
     Init();
 }