Beispiel #1
0
 public DoorwayPair(Tile previousTile, Doorway previousDoorway, PreProcessTileData nextTemplate, Doorway nextDoorway, TileSet nextTileSet, float tileWeight, float doorwayWeight)
 {
     PreviousTile    = previousTile;
     PreviousDoorway = previousDoorway;
     NextTemplate    = nextTemplate;
     NextDoorway     = nextDoorway;
     NextTileSet     = nextTileSet;
     TileWeight      = tileWeight;
     DoorwayWeight   = doorwayWeight;
 }
Beispiel #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);
        }
Beispiel #3
0
 public GameObjectChance(GameObject value, float mainPathWeight, float branchPathWeight, TileSet tileSet)
 {
     Value            = value;
     MainPathWeight   = mainPathWeight;
     BranchPathWeight = branchPathWeight;
     TileSet          = tileSet;
 }