1
0
Fork 0

First try at ParticleSystem for car | Tile render layer set to object

This commit is contained in:
Saibotk 2018-04-22 20:31:00 +02:00
parent 5a5ce57c10
commit 2b2bcbb7ed
25 changed files with 4746 additions and 114 deletions

File diff suppressed because it is too large Load diff

View file

@ -137,8 +137,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 1310459315
m_SortingLayer: 0 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 6e7545b35610da243b692db13fb3c380, type: 3} m_Sprite: {fileID: 21300000, guid: 6e7545b35610da243b692db13fb3c380, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -72,8 +72,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 1778783263
m_SortingLayer: 0 m_SortingLayer: -2
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 79d2e82f1d7398f41aa2dd6501e9d21c, type: 3} m_Sprite: {fileID: 21300000, guid: 79d2e82f1d7398f41aa2dd6501e9d21c, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 1 m_SortingOrder: 1
m_Sprite: {fileID: 21300000, guid: 501cd953a03a59f4aa2fd59e8b36f811, type: 3} m_Sprite: {fileID: 21300000, guid: 501cd953a03a59f4aa2fd59e8b36f811, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 82051033f41334d428de695a5a8e7c12, type: 3} m_Sprite: {fileID: 21300000, guid: 82051033f41334d428de695a5a8e7c12, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: c475ca15f80477e408ff4a4307e97c1e, type: 3} m_Sprite: {fileID: 21300000, guid: c475ca15f80477e408ff4a4307e97c1e, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 238a9e0dfc53f5e4ab2d01e57520b72a, type: 3} m_Sprite: {fileID: 21300000, guid: 238a9e0dfc53f5e4ab2d01e57520b72a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 106ee2c5b569c9a4489a53f7c09ec01d, type: 3} m_Sprite: {fileID: 21300000, guid: 106ee2c5b569c9a4489a53f7c09ec01d, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 4400c4135c42bba4a8cdc614dee7cc71, type: 3} m_Sprite: {fileID: 21300000, guid: 4400c4135c42bba4a8cdc614dee7cc71, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 57f730fb313fa4f4a9a6bff7b5b6d989, type: 3} m_Sprite: {fileID: 21300000, guid: 57f730fb313fa4f4a9a6bff7b5b6d989, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 41944bee4ca9a194a9c9445a9e6e3a0c, type: 3} m_Sprite: {fileID: 21300000, guid: 41944bee4ca9a194a9c9445a9e6e3a0c, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 2e92ac748c8ec9c48bc704174cbda95a, type: 3} m_Sprite: {fileID: 21300000, guid: 2e92ac748c8ec9c48bc704174cbda95a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 47b3779112f32c24baa11de4d6d5c845, type: 3} m_Sprite: {fileID: 21300000, guid: 47b3779112f32c24baa11de4d6d5c845, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 35f28a36eba6ad044bea0c72a00d97fc, type: 3} m_Sprite: {fileID: 21300000, guid: 35f28a36eba6ad044bea0c72a00d97fc, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 63d16c78755cba745921718c743a2116, type: 3} m_Sprite: {fileID: 21300000, guid: 63d16c78755cba745921718c743a2116, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 8ef67ce279976d44a9338fb41a62e7d6, type: 3} m_Sprite: {fileID: 21300000, guid: 8ef67ce279976d44a9338fb41a62e7d6, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: ef89da04d3747bb48a064d87501b6d01, type: 3} m_Sprite: {fileID: 21300000, guid: ef89da04d3747bb48a064d87501b6d01, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 8f27887e9aa83824895057a4385066db, type: 3} m_Sprite: {fileID: 21300000, guid: 8f27887e9aa83824895057a4385066db, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1688722395 m_SortingLayerID: 1310459315
m_SortingLayer: 1 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 0dc1a020a0b54c844a7e774f68714d24, type: 3} m_Sprite: {fileID: 21300000, guid: 0dc1a020a0b54c844a7e774f68714d24, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 1310459315
m_SortingLayer: 0 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 27158993fe3e5214bb8a679006e843ff, type: 3} m_Sprite: {fileID: 21300000, guid: 27158993fe3e5214bb8a679006e843ff, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 1310459315
m_SortingLayer: 0 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 84ba95c2bc5775849a0e2ea9b11724c2, type: 3} m_Sprite: {fileID: 21300000, guid: 84ba95c2bc5775849a0e2ea9b11724c2, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -98,8 +98,8 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 1310459315
m_SortingLayer: 0 m_SortingLayer: -1
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: f659418abd9d52a458ccd5747ff550f6, type: 3} m_Sprite: {fileID: 21300000, guid: f659418abd9d52a458ccd5747ff550f6, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}

View file

@ -1025,6 +1025,10 @@ Prefab:
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 4 value: 4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1679161327080020, guid: 3d1911457c1e44f53b6b4044334db52f, type: 2}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 3d1911457c1e44f53b6b4044334db52f, type: 2} m_ParentPrefab: {fileID: 100100000, guid: 3d1911457c1e44f53b6b4044334db52f, type: 2}
m_IsPrefabParent: 0 m_IsPrefabParent: 0
@ -1121,7 +1125,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5d9a051e822e2cf4ea3ca01c5a4df37c, type: 3} m_Script: {fileID: 11500000, guid: 5d9a051e822e2cf4ea3ca01c5a4df37c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
followThis: {fileID: 1239288696} followThis: {fileID: 0}
--- !u!1 &1001682580 --- !u!1 &1001682580
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1370,7 +1374,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!114 &1487324257 --- !u!114 &1487324257
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1382,6 +1386,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4f52f2b666c1ec64195aad9936df2d4f, type: 3} m_Script: {fileID: 11500000, guid: 4f52f2b666c1ec64195aad9936df2d4f, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
notifications: {fileID: 0}
gameOverPanel: {fileID: 354516592} gameOverPanel: {fileID: 354516592}
healthcontroller: {fileID: 623293249} healthcontroller: {fileID: 623293249}
--- !u!4 &1487324258 --- !u!4 &1487324258
@ -1629,8 +1634,8 @@ MonoBehaviour:
RockLUR: {fileID: 1938166751346222, guid: 6b83a6a46c57a634fa5085684bad0085, type: 2} RockLUR: {fileID: 1938166751346222, guid: 6b83a6a46c57a634fa5085684bad0085, type: 2}
RockURD: {fileID: 1437035058628240, guid: 30338afac8ce7054fbff8de89db815e8, type: 2} RockURD: {fileID: 1437035058628240, guid: 30338afac8ce7054fbff8de89db815e8, type: 2}
RockLRD: {fileID: 1251219893662246, guid: e37e0c5d4b013304cbcb32b223264452, type: 2} RockLRD: {fileID: 1251219893662246, guid: e37e0c5d4b013304cbcb32b223264452, type: 2}
ui: {fileID: 1487324256}
cam: {fileID: 881384367}
playerPrefab: {fileID: 1679161327080020, guid: 3d1911457c1e44f53b6b4044334db52f, playerPrefab: {fileID: 1679161327080020, guid: 3d1911457c1e44f53b6b4044334db52f,
type: 2} type: 2}
ui: {fileID: 1487324256}
cam: {fileID: 881384367}
mapRoot: {fileID: 1624368723} mapRoot: {fileID: 1624368723}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d819f21fefea9da4199b468cca99e711
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -45,10 +45,10 @@ public class DungeonGenerator {
break; break;
} }
} }
if (changed) if ( changed )
break; break;
} }
if (!changed) if ( !changed )
break; break;
} }
@ -128,13 +128,13 @@ public class DungeonGenerator {
for ( int x1 = r.bounds.x; x1 < r.bounds.x + r.bounds.width; x1++ ) for ( int x1 = r.bounds.x; x1 < r.bounds.x + r.bounds.width; x1++ )
for ( int y1 = r.bounds.y; y1 < r.bounds.y + r.bounds.height; y1++ ) { for ( int y1 = r.bounds.y; y1 < r.bounds.y + r.bounds.height; y1++ ) {
Vector2Int pos1 = new Vector2Int(x1, y1); Vector2Int pos1 = new Vector2Int(x1, y1);
if (path.tiles.ContainsKey(pos1)) if ( path.tiles.ContainsKey(pos1) )
path.tiles[pos1] = Room.TileType.GROUND; path.tiles[pos1] = Room.TileType.GROUND;
else else
path.tiles.Add(pos1, Room.TileType.GROUND); path.tiles.Add(pos1, Room.TileType.GROUND);
for ( int x2 = x1 - 1; x2 <= x1 + 1; x2++ ) for ( int x2 = x1 - 1; x2 <= x1 + 1; x2++ )
for ( int y2 = y1 - 1; y2 <= y1 + 1; y2++ ) { for ( int y2 = y1 - 1; y2 <= y1 + 1; y2++ ) {
if (!path.tiles.ContainsKey(new Vector2Int(x2, y2))) if ( !path.tiles.ContainsKey(new Vector2Int(x2, y2)) )
path.tiles.Add(new Vector2Int(x2, y2), Room.TileType.WALL); path.tiles.Add(new Vector2Int(x2, y2), Room.TileType.WALL);
} }
} }
@ -148,18 +148,17 @@ public class DungeonGenerator {
for ( int y1 = r.bounds.y + 1; y1 < r.bounds.y + r.bounds.height - 1; y1++ ) { for ( int y1 = r.bounds.y + 1; y1 < r.bounds.y + r.bounds.height - 1; y1++ ) {
r.tiles[new Vector2Int(x1, y1)] = Room.TileType.GROUND; r.tiles[new Vector2Int(x1, y1)] = Room.TileType.GROUND;
} }
foreach (Vector2Int v in r.AllDoors()) foreach ( Vector2Int v in r.AllDoors() ) {
{
Debug.Log("Door: " + v); Debug.Log("Door: " + v);
if (!r.bounds.Contains(v)) if ( !r.bounds.Contains(v) )
throw new NotSupportedException("This is a bug where doors land in the wrong room. It should have been fixed."); throw new NotSupportedException("This is a bug where doors land in the wrong room. It should have been fixed.");
else else
r.tiles[v] = Room.TileType.DOOR; r.tiles[v] = Room.TileType.DOOR;
} }
} }
foreach (GenRoom r in rooms) { foreach ( GenRoom r in rooms ) {
generateInterior (r); generateInterior(r);
} }
start = root.r; start = root.r;
@ -171,7 +170,7 @@ public class DungeonGenerator {
rooms.Remove(start); rooms.Remove(start);
rooms.Remove(end); rooms.Remove(end);
foreach (GenRoom r in rooms) foreach ( GenRoom r in rooms )
makeRoomRelative(r); makeRoomRelative(r);
makeRoomRelative(start); makeRoomRelative(start);
makeRoomRelative(end); makeRoomRelative(end);
@ -180,8 +179,8 @@ public class DungeonGenerator {
public void makeRoomRelative(GenRoom room) { public void makeRoomRelative(GenRoom room) {
room.roomPosition = room.bounds.position; room.roomPosition = room.bounds.position;
foreach (Vector2Int v in room.tiles.Keys) { foreach ( Vector2Int v in room.tiles.Keys ) {
v.Set((v - room.roomPosition).x, (v-room.roomPosition).y); v.Set(( v - room.roomPosition ).x, ( v - room.roomPosition ).y);
} }
} }
@ -357,8 +356,7 @@ public class DungeonGenerator {
} }
} }
public static void generateInterior(GenRoom r) public static void generateInterior(GenRoom r) {
{
//int width = r.bounds.width; //int width = r.bounds.width;
//int height = r.bounds.height; //int height = r.bounds.height;