1
0
Fork 0

Paint ground below wall/rock

This commit is contained in:
Piegames 2018-04-23 01:32:20 +02:00
parent fb94c320c8
commit 4f24f39611
3 changed files with 20 additions and 4 deletions

View file

@ -70,16 +70,16 @@ public class GenerationProcessor {
break;
}
CreateGOFromType(v, rotation, type, root);
CreateGOFromType(v, rotation, tiles[v].type, type, root);
}
return root;
}
private GameObject CreateGOFromType(Vector2 v, int rotation, ExtendedTileType t, GameObject root) {
private GameObject CreateGOFromType(Vector2 v, int rotation, Room.TileType type, ExtendedTileType t, GameObject root) {
GameObject tmp = null;
//if (t == ExtendedTileType.BorderInner || t == ExtendedTileType.BorderOuter || t == ExtendedTileType.BorderInner)
// CreateGOFromType(v, rotation, ExtendedTileType.Ground, root);
if (type == Room.TileType.ROCK || type == Room.TileType.WALL)
CreateGOFromType(v, 0, Room.TileType.GROUND, ExtendedTileType.Ground, root);
if ( prefabs.ContainsKey(t) && root != null ) {
tmp = Object.Instantiate(prefabs[t], root.transform);
tmp.transform.position = v;

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9ec323b9157704d00a3409f8ea6e46b2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: df6e7833427b5497b92308fb6f54e552
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: