Commit 3b3dd3c4 authored by 18류지석's avatar 18류지석

Merge branch 'prefab' into item

parents e7be3fc3 edeb99ad
fileFormatVersion: 2
guid: 601364380115f9d4f9d60741f1044aa1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
...@@ -398,9 +398,119 @@ CompositeCollider2D: ...@@ -398,9 +398,119 @@ CompositeCollider2D:
m_GeometryType: 0 m_GeometryType: 0
m_GenerationType: 0 m_GenerationType: 0
m_EdgeRadius: 0 m_EdgeRadius: 0
m_ColliderPaths: [] m_ColliderPaths:
- m_Collider: {fileID: 2113883504275735784}
m_ColliderPaths:
- - X: 130000000
Y: 210000000
- X: 110000000
Y: 210000000
- X: 110000000
Y: 206406256
- X: 130000000
Y: 206406256
- - X: 120000000
Y: 180000000
- X: 110000000
Y: 180000000
- X: 110000000
Y: 176406256
- X: 120000000
Y: 176406256
- - X: 20000000
Y: 170000000
- X: 10000000
Y: 170000000
- X: 10000000
Y: 166406256
- X: 20000000
Y: 166406256
- - X: 230000000
Y: 170000000
- X: 220000000
Y: 170000000
- X: 220000000
Y: 166406256
- X: 230000000
Y: 166406256
- - X: 50000000
Y: 150000000
- X: 30000000
Y: 150000000
- X: 30000000
Y: 146406256
- X: 50000000
Y: 146406256
- - X: 30000000
Y: 110000000
- X: 20000000
Y: 110000000
- X: 20000000
Y: 106406248
- X: 30000000
Y: 106406248
- - X: 210000000
Y: 90000000
- X: 200000000
Y: 90000000
- X: 200000000
Y: 86406248
- X: 210000000
Y: 86406248
- - X: 100000000
Y: 70000000
- X: 90000000
Y: 70000000
- X: 90000000
Y: 66406248
- X: 100000000
Y: 66406248
- - X: 130000000
Y: 1718750
- X: 110000000
Y: 1718750
- X: 110000000
Y: -2187500
- X: 130000000
Y: -2187500
m_CompositePaths: m_CompositePaths:
m_Paths: [] m_Paths:
- - {x: 13, y: 21}
- {x: 11, y: 21}
- {x: 11, y: 20.640625}
- {x: 13, y: 20.640625}
- - {x: 12, y: 18}
- {x: 11, y: 18}
- {x: 11, y: 17.640625}
- {x: 12, y: 17.640625}
- - {x: 2, y: 17}
- {x: 1, y: 17}
- {x: 1, y: 16.640625}
- {x: 2, y: 16.640625}
- - {x: 23, y: 17}
- {x: 22, y: 17}
- {x: 22, y: 16.640625}
- {x: 23, y: 16.640625}
- - {x: 5, y: 15}
- {x: 3, y: 15}
- {x: 3, y: 14.640626}
- {x: 5, y: 14.640626}
- - {x: 3, y: 11}
- {x: 2, y: 11}
- {x: 2, y: 10.640625}
- {x: 3, y: 10.640625}
- - {x: 21, y: 9}
- {x: 20, y: 9}
- {x: 20, y: 8.640625}
- {x: 21, y: 8.640625}
- - {x: 10, y: 7}
- {x: 9, y: 7}
- {x: 9, y: 6.640625}
- {x: 10, y: 6.640625}
- - {x: 13, y: 0.171875}
- {x: 11, y: 0.171875}
- {x: 11, y: -0.21875}
- {x: 13, y: -0.21875}
m_VertexDistance: 0.0005 m_VertexDistance: 0.0005
--- !u!66 &66763079715791502 --- !u!66 &66763079715791502
CompositeCollider2D: CompositeCollider2D:
...@@ -2988,8 +3098,8 @@ Tilemap: ...@@ -2988,8 +3098,8 @@ Tilemap:
m_ColliderType: 1 m_ColliderType: 1
- first: {x: 23, y: 6, z: 0} - first: {x: 23, y: 6, z: 0}
second: second:
m_TileIndex: 21 m_TileIndex: 22
m_TileSpriteIndex: 21 m_TileSpriteIndex: 22
m_TileMatrixIndex: 0 m_TileMatrixIndex: 0
m_TileColorIndex: 0 m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0} m_ObjectToInstantiate: {fileID: 0}
...@@ -3489,9 +3599,9 @@ Tilemap: ...@@ -3489,9 +3599,9 @@ Tilemap:
m_Data: {fileID: 11400000, guid: 2967ea61b7da1db4c82ad335fabe0a79, type: 2} m_Data: {fileID: 11400000, guid: 2967ea61b7da1db4c82ad335fabe0a79, type: 2}
- m_RefCount: 4 - m_RefCount: 4
m_Data: {fileID: 11400000, guid: d54e80b6b48e4b84e82dc89fab2eec4c, type: 2} m_Data: {fileID: 11400000, guid: d54e80b6b48e4b84e82dc89fab2eec4c, type: 2}
- m_RefCount: 9 - m_RefCount: 8
m_Data: {fileID: 11400000, guid: 658696c04dfc5c4438eb2f0306e10f12, type: 2} m_Data: {fileID: 11400000, guid: 658696c04dfc5c4438eb2f0306e10f12, type: 2}
- m_RefCount: 1 - m_RefCount: 2
m_Data: {fileID: 11400000, guid: 78b3f2e87b92cee4e88fe15a5aabef92, type: 2} m_Data: {fileID: 11400000, guid: 78b3f2e87b92cee4e88fe15a5aabef92, type: 2}
- m_RefCount: 1 - m_RefCount: 1
m_Data: {fileID: 11400000, guid: 81155fc6fe2288340bb0248e49de6fd4, type: 2} m_Data: {fileID: 11400000, guid: 81155fc6fe2288340bb0248e49de6fd4, type: 2}
...@@ -3538,9 +3648,9 @@ Tilemap: ...@@ -3538,9 +3648,9 @@ Tilemap:
m_Data: {fileID: 21300000, guid: d93a920ae642b2241b3cc429e7c534a4, type: 3} m_Data: {fileID: 21300000, guid: d93a920ae642b2241b3cc429e7c534a4, type: 3}
- m_RefCount: 4 - m_RefCount: 4
m_Data: {fileID: 21300000, guid: c63279f051b1b4e48bfb0e43ad31c196, type: 3} m_Data: {fileID: 21300000, guid: c63279f051b1b4e48bfb0e43ad31c196, type: 3}
- m_RefCount: 9 - m_RefCount: 8
m_Data: {fileID: 21300000, guid: 5d7bd4761dfd8e64c815bbd19358c4ff, type: 3} m_Data: {fileID: 21300000, guid: 5d7bd4761dfd8e64c815bbd19358c4ff, type: 3}
- m_RefCount: 1 - m_RefCount: 2
m_Data: {fileID: 21300000, guid: 971af024b3ec5db448d166a30a8ed037, type: 3} m_Data: {fileID: 21300000, guid: 971af024b3ec5db448d166a30a8ed037, type: 3}
- m_RefCount: 1 - m_RefCount: 1
m_Data: {fileID: 21300000, guid: e396c3138529f3c45879540d36bd53eb, type: 3} m_Data: {fileID: 21300000, guid: e396c3138529f3c45879540d36bd53eb, type: 3}
......
...@@ -304,9 +304,119 @@ CompositeCollider2D: ...@@ -304,9 +304,119 @@ CompositeCollider2D:
m_GeometryType: 0 m_GeometryType: 0
m_GenerationType: 0 m_GenerationType: 0
m_EdgeRadius: 0 m_EdgeRadius: 0
m_ColliderPaths: [] m_ColliderPaths:
- m_Collider: {fileID: 2113883507228558470}
m_ColliderPaths:
- - X: 130000000
Y: 210000000
- X: 110000000
Y: 210000000
- X: 110000000
Y: 206406256
- X: 130000000
Y: 206406256
- - X: 120000000
Y: 180000000
- X: 110000000
Y: 180000000
- X: 110000000
Y: 176406256
- X: 120000000
Y: 176406256
- - X: 20000000
Y: 170000000
- X: 10000000
Y: 170000000
- X: 10000000
Y: 166406256
- X: 20000000
Y: 166406256
- - X: 230000000
Y: 170000000
- X: 220000000
Y: 170000000
- X: 220000000
Y: 166406256
- X: 230000000
Y: 166406256
- - X: 50000000
Y: 150000000
- X: 30000000
Y: 150000000
- X: 30000000
Y: 146406256
- X: 50000000
Y: 146406256
- - X: 30000000
Y: 110000000
- X: 20000000
Y: 110000000
- X: 20000000
Y: 106406248
- X: 30000000
Y: 106406248
- - X: 210000000
Y: 90000000
- X: 200000000
Y: 90000000
- X: 200000000
Y: 86406248
- X: 210000000
Y: 86406248
- - X: 100000000
Y: 70000000
- X: 90000000
Y: 70000000
- X: 90000000
Y: 66406248
- X: 100000000
Y: 66406248
- - X: 130000000
Y: 1718750
- X: 110000000
Y: 1718750
- X: 110000000
Y: -2187500
- X: 130000000
Y: -2187500
m_CompositePaths: m_CompositePaths:
m_Paths: [] m_Paths:
- - {x: 13, y: 21}
- {x: 11, y: 21}
- {x: 11, y: 20.640625}
- {x: 13, y: 20.640625}
- - {x: 12, y: 18}
- {x: 11, y: 18}
- {x: 11, y: 17.640625}
- {x: 12, y: 17.640625}
- - {x: 2, y: 17}
- {x: 1, y: 17}
- {x: 1, y: 16.640625}
- {x: 2, y: 16.640625}
- - {x: 23, y: 17}
- {x: 22, y: 17}
- {x: 22, y: 16.640625}
- {x: 23, y: 16.640625}
- - {x: 5, y: 15}
- {x: 3, y: 15}
- {x: 3, y: 14.640626}
- {x: 5, y: 14.640626}
- - {x: 3, y: 11}
- {x: 2, y: 11}
- {x: 2, y: 10.640625}
- {x: 3, y: 10.640625}
- - {x: 21, y: 9}
- {x: 20, y: 9}
- {x: 20, y: 8.640625}
- {x: 21, y: 8.640625}
- - {x: 10, y: 7}
- {x: 9, y: 7}
- {x: 9, y: 6.640625}
- {x: 10, y: 6.640625}
- - {x: 13, y: 0.171875}
- {x: 11, y: 0.171875}
- {x: 11, y: -0.21875}
- {x: 13, y: -0.21875}
m_VertexDistance: 0.0005 m_VertexDistance: 0.0005
--- !u!66 &66467322663966308 --- !u!66 &66467322663966308
CompositeCollider2D: CompositeCollider2D:
...@@ -439,14 +549,6 @@ CompositeCollider2D: ...@@ -439,14 +549,6 @@ CompositeCollider2D:
Y: 50000000 Y: 50000000
- X: 20000000 - X: 20000000
Y: 50000000 Y: 50000000
- - X: 90000000
Y: 110000000
- X: 70000000
Y: 110000000
- X: 70000000
Y: 30000000
- X: 90000000
Y: 30000000
- - X: 200000000 - - X: 200000000
Y: 110000000 Y: 110000000
- X: 180000000 - X: 180000000
...@@ -455,14 +557,14 @@ CompositeCollider2D: ...@@ -455,14 +557,14 @@ CompositeCollider2D:
Y: 30000000 Y: 30000000
- X: 200000000 - X: 200000000
Y: 30000000 Y: 30000000
- - X: 50000000 - - X: 90000000
Y: 90000000 Y: 110000000
- X: 30000000 - X: 70000000
Y: 90000000 Y: 110000000
- X: 30000000 - X: 70000000
Y: 10000000 Y: 30000000
- X: 50000000 - X: 90000000
Y: 10000000 Y: 30000000
- - X: 150000000 - - X: 150000000
Y: 90000000 Y: 90000000
- X: 130000000 - X: 130000000
...@@ -471,6 +573,14 @@ CompositeCollider2D: ...@@ -471,6 +573,14 @@ CompositeCollider2D:
Y: 10000000 Y: 10000000
- X: 150000000 - X: 150000000
Y: 10000000 Y: 10000000
- - X: 50000000
Y: 90000000
- X: 30000000
Y: 90000000
- X: 30000000
Y: 10000000
- X: 50000000
Y: 10000000
m_CompositePaths: m_CompositePaths:
m_Paths: m_Paths:
- - {x: 15, y: 21} - - {x: 15, y: 21}
...@@ -529,22 +639,22 @@ CompositeCollider2D: ...@@ -529,22 +639,22 @@ CompositeCollider2D:
- {x: 1, y: 13} - {x: 1, y: 13}
- {x: 1, y: 5} - {x: 1, y: 5}
- {x: 2, y: 5} - {x: 2, y: 5}
- - {x: 9, y: 11}
- {x: 7, y: 11}
- {x: 7, y: 3}
- {x: 9, y: 3}
- - {x: 20, y: 11} - - {x: 20, y: 11}
- {x: 18, y: 11} - {x: 18, y: 11}
- {x: 18, y: 3} - {x: 18, y: 3}
- {x: 20, y: 3} - {x: 20, y: 3}
- - {x: 5, y: 9} - - {x: 9, y: 11}
- {x: 3, y: 9} - {x: 7, y: 11}
- {x: 3, y: 1} - {x: 7, y: 3}
- {x: 5, y: 1} - {x: 9, y: 3}
- - {x: 15, y: 9} - - {x: 15, y: 9}
- {x: 13, y: 9} - {x: 13, y: 9}
- {x: 13, y: 1} - {x: 13, y: 1}
- {x: 15, y: 1} - {x: 15, y: 1}
- - {x: 5, y: 9}
- {x: 3, y: 9}
- {x: 3, y: 1}
- {x: 5, y: 1}
m_VertexDistance: 0.0005 m_VertexDistance: 0.0005
--- !u!66 &66779662859196158 --- !u!66 &66779662859196158
CompositeCollider2D: CompositeCollider2D:
...@@ -565,20 +675,6 @@ CompositeCollider2D: ...@@ -565,20 +675,6 @@ CompositeCollider2D:
m_ColliderPaths: m_ColliderPaths:
- m_Collider: {fileID: 2113883505427433984} - m_Collider: {fileID: 2113883505427433984}
m_ColliderPaths: m_ColliderPaths:
- - X: 240000000
Y: 239843744
- X: 239843744
Y: 240000000
- X: 130000000
Y: 240000000
- X: 130000000
Y: 230000000
- X: 230000000
Y: 230000000
- X: 230000000
Y: 190000000
- X: 240000000
Y: 190000000
- - X: 10000000 - - X: 10000000
Y: 230000000 Y: 230000000
- X: 110000000 - X: 110000000
...@@ -593,16 +689,20 @@ CompositeCollider2D: ...@@ -593,16 +689,20 @@ CompositeCollider2D:
Y: 190000000 Y: 190000000
- X: 10000000 - X: 10000000
Y: 190000000 Y: 190000000
- - X: 10000000 - - X: 240000000
Y: 169843744 Y: 239843744
- X: 9843750 - X: 239843744
Y: 170000000 Y: 240000000
- X: 0 - X: 130000000
Y: 170000000 Y: 240000000
- X: 0 - X: 130000000
Y: 30000000 Y: 230000000
- X: 10000000 - X: 230000000
Y: 30000000 Y: 230000000
- X: 230000000
Y: 190000000
- X: 240000000
Y: 190000000
- - X: 240000000 - - X: 240000000
Y: 169843744 Y: 169843744
- X: 239843744 - X: 239843744
...@@ -613,16 +713,16 @@ CompositeCollider2D: ...@@ -613,16 +713,16 @@ CompositeCollider2D:
Y: 30000000 Y: 30000000
- X: 240000000 - X: 240000000
Y: 30000000 Y: 30000000
- - X: 240000000 - - X: 10000000
Y: 9843750 Y: 169843744
- X: 239843744 - X: 9843750
Y: 10000000 Y: 170000000
- X: 130000000 - X: 0
Y: 10000000 Y: 170000000
- X: 130000000 - X: 0
Y: 0 Y: 30000000
- X: 240000000 - X: 10000000
Y: 0 Y: 30000000
- - X: 110000000 - - X: 110000000
Y: 9843750 Y: 9843750
- X: 109843752 - X: 109843752
...@@ -633,15 +733,18 @@ CompositeCollider2D: ...@@ -633,15 +733,18 @@ CompositeCollider2D:
Y: 0 Y: 0
- X: 110000000 - X: 110000000
Y: 0 Y: 0
- - X: 240000000
Y: 9843750
- X: 239843744
Y: 10000000
- X: 130000000
Y: 10000000
- X: 130000000
Y: 0
- X: 240000000
Y: 0
m_CompositePaths: m_CompositePaths:
m_Paths: m_Paths:
- - {x: 24, y: 23.984375}
- {x: 23.984375, y: 24}
- {x: 13, y: 24}
- {x: 13, y: 23}
- {x: 23, y: 23}
- {x: 23, y: 19}
- {x: 24, y: 19}
- - {x: 1, y: 23} - - {x: 1, y: 23}
- {x: 11, y: 23} - {x: 11, y: 23}
- {x: 11, y: 23.984375} - {x: 11, y: 23.984375}
...@@ -649,26 +752,33 @@ CompositeCollider2D: ...@@ -649,26 +752,33 @@ CompositeCollider2D:
- {x: 0, y: 24} - {x: 0, y: 24}
- {x: 0, y: 19} - {x: 0, y: 19}
- {x: 1, y: 19} - {x: 1, y: 19}
- - {x: 1, y: 16.984375} - - {x: 24, y: 23.984375}
- {x: 0.984375, y: 17} - {x: 23.984375, y: 24}
- {x: 0, y: 17} - {x: 13, y: 24}
- {x: 0, y: 3} - {x: 13, y: 23}
- {x: 1, y: 3} - {x: 23, y: 23}
- {x: 23, y: 19}
- {x: 24, y: 19}
- - {x: 24, y: 16.984375} - - {x: 24, y: 16.984375}
- {x: 23.984375, y: 17} - {x: 23.984375, y: 17}
- {x: 23, y: 17} - {x: 23, y: 17}
- {x: 23, y: 3} - {x: 23, y: 3}
- {x: 24, y: 3} - {x: 24, y: 3}
- - {x: 24, y: 0.984375} - - {x: 1, y: 16.984375}
- {x: 23.984375, y: 1} - {x: 0.984375, y: 17}
- {x: 13, y: 1} - {x: 0, y: 17}
- {x: 13, y: 0} - {x: 0, y: 3}
- {x: 24, y: 0} - {x: 1, y: 3}
- - {x: 11, y: 0.984375} - - {x: 11, y: 0.984375}
- {x: 10.984375, y: 1} - {x: 10.984375, y: 1}
- {x: 0, y: 1} - {x: 0, y: 1}
- {x: 0, y: 0} - {x: 0, y: 0}
- {x: 11, y: 0} - {x: 11, y: 0}
- - {x: 24, y: 0.984375}
- {x: 23.984375, y: 1}
- {x: 13, y: 1}
- {x: 13, y: 0}
- {x: 24, y: 0}
m_VertexDistance: 0.0005 m_VertexDistance: 0.0005
--- !u!66 &66856536747254948 --- !u!66 &66856536747254948
CompositeCollider2D: CompositeCollider2D:
...@@ -3109,8 +3219,8 @@ Tilemap: ...@@ -3109,8 +3219,8 @@ Tilemap:
m_ColliderType: 1 m_ColliderType: 1
- first: {x: 23, y: 6, z: 0} - first: {x: 23, y: 6, z: 0}
second: second:
m_TileIndex: 21 m_TileIndex: 22
m_TileSpriteIndex: 21 m_TileSpriteIndex: 22
m_TileMatrixIndex: 0 m_TileMatrixIndex: 0
m_TileColorIndex: 0 m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0} m_ObjectToInstantiate: {fileID: 0}
...@@ -3610,9 +3720,9 @@ Tilemap: ...@@ -3610,9 +3720,9 @@ Tilemap:
m_Data: {fileID: 11400000, guid: 2967ea61b7da1db4c82ad335fabe0a79, type: 2} m_Data: {fileID: 11400000, guid: 2967ea61b7da1db4c82ad335fabe0a79, type: 2}
- m_RefCount: 4 - m_RefCount: 4
m_Data: {fileID: 11400000, guid: d54e80b6b48e4b84e82dc89fab2eec4c, type: 2} m_Data: {fileID: 11400000, guid: d54e80b6b48e4b84e82dc89fab2eec4c, type: 2}
- m_RefCount: 9 - m_RefCount: 8
m_Data: {fileID: 11400000, guid: 658696c04dfc5c4438eb2f0306e10f12, type: 2} m_Data: {fileID: 11400000, guid: 658696c04dfc5c4438eb2f0306e10f12, type: 2}
- m_RefCount: 1 - m_RefCount: 2
m_Data: {fileID: 11400000, guid: 78b3f2e87b92cee4e88fe15a5aabef92, type: 2} m_Data: {fileID: 11400000, guid: 78b3f2e87b92cee4e88fe15a5aabef92, type: 2}
m_TileSpriteArray: m_TileSpriteArray:
- m_RefCount: 1 - m_RefCount: 1
...@@ -3657,9 +3767,9 @@ Tilemap: ...@@ -3657,9 +3767,9 @@ Tilemap:
m_Data: {fileID: 21300000, guid: d93a920ae642b2241b3cc429e7c534a4, type: 3} m_Data: {fileID: 21300000, guid: d93a920ae642b2241b3cc429e7c534a4, type: 3}
- m_RefCount: 4 - m_RefCount: 4
m_Data: {fileID: 21300000, guid: c63279f051b1b4e48bfb0e43ad31c196, type: 3} m_Data: {fileID: 21300000, guid: c63279f051b1b4e48bfb0e43ad31c196, type: 3}
- m_RefCount: 9 - m_RefCount: 8
m_Data: {fileID: 21300000, guid: 5d7bd4761dfd8e64c815bbd19358c4ff, type: 3} m_Data: {fileID: 21300000, guid: 5d7bd4761dfd8e64c815bbd19358c4ff, type: 3}
- m_RefCount: 1 - m_RefCount: 2
m_Data: {fileID: 21300000, guid: 971af024b3ec5db448d166a30a8ed037, type: 3} m_Data: {fileID: 21300000, guid: 971af024b3ec5db448d166a30a8ed037, type: 3}
m_TileMatrixArray: m_TileMatrixArray:
- m_RefCount: 80 - m_RefCount: 80
......
fileFormatVersion: 2
guid: ba3eb4a3ac9f75f40b3cb8334e048476
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
public class ChangePlatformTile : MonoBehaviour {
public Tilemap map;
public Tile currentTile;
public Tile forestRuin;
public Tile iceTemple;
public Tile waterWay;
public Tile underTree;
// Use this for initialization
private void Start()
{
map.SwapTile(currentTile, forestRuin);
}
/*
if(concept 숲속유적)
map.SwapTile(currentTile, forestRuin);
if concept 얼음신전
map.SwapTile(currentTile, iceTemple);
if concept 수로
map.SwapTile(currentTile, waterWay);
if concept 나무아래
map.SwapTile(currentTile, underTree);
*/
private void Update()
{
}
// Update is called once per frame
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
public class SwapTile : MonoBehaviour {
public TileBase[] tileFR;
public TileBase[] tileIT;
public TileBase[] tileWW;
public TileBase[] tileUT;
public Tilemap map;
public RoomInGame roomInGame;
public TileBase[] fillLeftDoor;
public TileBase[] fillRightDoor;
//기본 테마를 숲속 유적으로 하고 if(얼음신전)
public void Init()
{
for(int i=0;i<tileFR.Length;i++)
map.SwapTile(tileFR[i], tileIT[i]);
}
/*
같은 방식으로
if(수로)
for(int i=0;i<tileFR.Length;i++)
map.SwapTile(tileFR[i], tileWW[i]);
if(나무아래)
for(int i=0;i<tileFR.Length;i++)
map.SwapTile(tileFR[i], tileUT[i]);
*/
public void FillEmptyDoor(int leftDoorLocation, int rightDoorLocation)
{
Tilemap outerWallMap = roomInGame.transform.GetChild(4).GetComponent<Tilemap>();
int[] doorLocations = { 1, 9 ,17};
for (int i = 0; i < 3; i++)
{
//경우를 따지자
/*
* 왼쪽의 경우
* 문 위 타일
* 1. 오른쪽에 타일이 없음 -> [| |] 모양 넣기 0
* 2. 오른쪽에만 타일이 있음 -> [| .] 모양 넣기 2
* 3. 오른쪽이랑 오른쪽 대각선 위에 타일이 있음 -> [| ] 모양 넣기 1
*
* 문 아래 타일
* 1. 오른쪽 타일 없음 -> 문 위랑 동일
* 2. 오른족에만 타일 -> [| '] 모양 넣기 3
* 3. 오른족이랑 오른쪽 대각선 아래에 타일 -> [| ] 모양
*
* 오른쪽의 경우
* 문 위 타일
* 1. 왼쪽에 X -> [| |]
* 2. 왼쪽에만 -> [. |]
* 3. 왼쪽이랑 왼쪽 대각선 아래 -> [ |]
*
* 문 아래
* 1. 왼쪽에 X -> [| |]
* 2. 왼쪽에만 -> [' |]
* 3. 왼쪽이랑 왼쪽 대각선 위 -> [ |]
*/
if (i != leftDoorLocation)
{
outerWallMap.SetTile(new Vector3Int(0, doorLocations[i] + 1, 0), fillLeftDoor[0]);
outerWallMap.SetTile(new Vector3Int(0, doorLocations[i], 0), fillLeftDoor[0]);
if(outerWallMap.HasTile(new Vector3Int(1, doorLocations[i] + 2, 0)) && outerWallMap.HasTile(new Vector3Int(1, doorLocations[i] + 3, 0)))
outerWallMap.SetTile(new Vector3Int(0, doorLocations[i] + 2, 0), fillLeftDoor[1]);
else if (outerWallMap.HasTile(new Vector3Int(1, doorLocations[i] + 2, 0)))
outerWallMap.SetTile(new Vector3Int(0, doorLocations[i] + 2, 0), fillLeftDoor[2]);
else
outerWallMap.SetTile(new Vector3Int(0, doorLocations[i] + 2, 0), fillLeftDoor[0]);
if(outerWallMap.HasTile(new Vector3Int(1, doorLocations[i] -1, 0)) && outerWallMap.HasTile(new Vector3Int(1, doorLocations[i] - 2, 0)))
outerWallMap.SetTile(new Vector3Int(0, doorLocations[i] - 1, 0), fillLeftDoor[1]);
else if(outerWallMap.HasTile(new Vector3Int(1, doorLocations[i] - 1, 0)))
outerWallMap.SetTile(new Vector3Int(0, doorLocations[i] - 1, 0), fillLeftDoor[3]);
else
outerWallMap.SetTile(new Vector3Int(0, doorLocations[i] - 1, 0), fillLeftDoor[0]);
}
if (i != rightDoorLocation)
{
outerWallMap.SetTile(new Vector3Int(23, doorLocations[i] + 1, 0), fillRightDoor[0]);
outerWallMap.SetTile(new Vector3Int(23, doorLocations[i], 0), fillRightDoor[0]);
if (outerWallMap.HasTile(new Vector3Int(22, doorLocations[i] + 2, 0)) && outerWallMap.HasTile(new Vector3Int(22, doorLocations[i] + 3, 0)))
outerWallMap.SetTile(new Vector3Int(23, doorLocations[i] + 2, 0), fillRightDoor[1]);
else if(outerWallMap.HasTile(new Vector3Int(22, doorLocations[i] + 2, 0)))
outerWallMap.SetTile(new Vector3Int(23, doorLocations[i] + 2, 0), fillRightDoor[2]);
else
outerWallMap.SetTile(new Vector3Int(23, doorLocations[i] + 2, 0), fillRightDoor[0]);
if (outerWallMap.HasTile(new Vector3Int(22, doorLocations[i] - 1, 0)) && outerWallMap.HasTile(new Vector3Int(22, doorLocations[i] - 2, 0)))
outerWallMap.SetTile(new Vector3Int(23, doorLocations[i] - 1, 0), fillRightDoor[1]);
else if (outerWallMap.HasTile(new Vector3Int(22, doorLocations[i] - 1, 0)))
outerWallMap.SetTile(new Vector3Int(23, doorLocations[i] - 1, 0), fillRightDoor[3]);
else
outerWallMap.SetTile(new Vector3Int(23, doorLocations[i] - 1, 0), fillRightDoor[0]);
}
}
}
}
fileFormatVersion: 2 fileFormatVersion: 2
guid: b259a6bdc27ef794580e14b9992fe520 guid: 5ba206a8812470440974a2c8bd56ca6b
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: ba3eb4a3ac9f75f40b3cb8334e048476 guid: 4fb7c28bb9762394fb04aa8ec420c17e
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0}
m_Name: Up_Door_Left1
m_EditorClassIdentifier:
m_Sprite: {fileID: 21300000, guid: 5a368a411148d41478bcc36f4bb88fdd, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Transform:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_InstancedGameObject: {fileID: 0}
m_Flags: 1
m_ColliderType: 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment