Commit 755664ce authored by 18손재민's avatar 18손재민

맵 에디터에서 이제 총알 및 목표 바닥을 추가할 수 있음

parent 53412f4b
...@@ -106,7 +106,6 @@ MonoBehaviour: ...@@ -106,7 +106,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: 0} mapPos: {x: 1, y: 0}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &1634709099193762938 --- !u!1 &1634709099193762938
GameObject: GameObject:
...@@ -214,7 +213,6 @@ MonoBehaviour: ...@@ -214,7 +213,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: -1} mapPos: {x: -2, y: -1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &1638206002697659172 --- !u!1 &1638206002697659172
GameObject: GameObject:
...@@ -322,7 +320,6 @@ MonoBehaviour: ...@@ -322,7 +320,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: 1} mapPos: {x: 1, y: 1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &1737410653383664023 --- !u!1 &1737410653383664023
GameObject: GameObject:
...@@ -378,6 +375,7 @@ MonoBehaviour: ...@@ -378,6 +375,7 @@ MonoBehaviour:
- {fileID: 6317210441967747213} - {fileID: 6317210441967747213}
- {fileID: 8692496119037193698} - {fileID: 8692496119037193698}
- {fileID: 4002211523417806573} - {fileID: 4002211523417806573}
initialBullets: 00000000010000000200000000000000010000000200000000000000010000000200000000000000
clearConditions: clearConditions:
- type: 0 - type: 0
count: 0 count: 0
...@@ -491,7 +489,6 @@ MonoBehaviour: ...@@ -491,7 +489,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: 0} mapPos: {x: 2, y: 0}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &2189700681577347922 --- !u!1 &2189700681577347922
GameObject: GameObject:
...@@ -599,7 +596,6 @@ MonoBehaviour: ...@@ -599,7 +596,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: 2} mapPos: {x: -2, y: 2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &2292282653549884484 --- !u!1 &2292282653549884484
GameObject: GameObject:
...@@ -707,7 +703,6 @@ MonoBehaviour: ...@@ -707,7 +703,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: 2} mapPos: {x: -1, y: 2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &2339437859421285817 --- !u!1 &2339437859421285817
GameObject: GameObject:
...@@ -815,7 +810,6 @@ MonoBehaviour: ...@@ -815,7 +810,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: -2} mapPos: {x: -2, y: -2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &2681926362236754680 --- !u!1 &2681926362236754680
GameObject: GameObject:
...@@ -923,7 +917,6 @@ MonoBehaviour: ...@@ -923,7 +917,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: 1} mapPos: {x: 2, y: 1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &3525591482656589422 --- !u!1 &3525591482656589422
GameObject: GameObject:
...@@ -1031,7 +1024,6 @@ MonoBehaviour: ...@@ -1031,7 +1024,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: -2} mapPos: {x: 2, y: -2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &4007647678807291638 --- !u!1 &4007647678807291638
GameObject: GameObject:
...@@ -1264,7 +1256,6 @@ MonoBehaviour: ...@@ -1264,7 +1256,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: -2} mapPos: {x: 1, y: -2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &4592160369612705167 --- !u!1 &4592160369612705167
GameObject: GameObject:
...@@ -1372,7 +1363,6 @@ MonoBehaviour: ...@@ -1372,7 +1363,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: -1} mapPos: {x: 1, y: -1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &4709249395185914413 --- !u!1 &4709249395185914413
GameObject: GameObject:
...@@ -1480,7 +1470,6 @@ MonoBehaviour: ...@@ -1480,7 +1470,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 1, y: 2} mapPos: {x: 1, y: 2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &4810397660174508062 --- !u!1 &4810397660174508062
GameObject: GameObject:
...@@ -1588,7 +1577,6 @@ MonoBehaviour: ...@@ -1588,7 +1577,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: -1} mapPos: {x: -1, y: -1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &5069305046428251933 --- !u!1 &5069305046428251933
GameObject: GameObject:
...@@ -1696,7 +1684,6 @@ MonoBehaviour: ...@@ -1696,7 +1684,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: 0} mapPos: {x: -1, y: 0}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &5342110572568681991 --- !u!1 &5342110572568681991
GameObject: GameObject:
...@@ -1804,7 +1791,6 @@ MonoBehaviour: ...@@ -1804,7 +1791,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: -2} mapPos: {x: 0, y: -2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &5390496715387352304 --- !u!1 &5390496715387352304
GameObject: GameObject:
...@@ -2092,7 +2078,6 @@ MonoBehaviour: ...@@ -2092,7 +2078,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: 1} mapPos: {x: 0, y: 1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &6532917746544365902 --- !u!1 &6532917746544365902
GameObject: GameObject:
...@@ -2234,7 +2219,6 @@ MonoBehaviour: ...@@ -2234,7 +2219,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: 1} mapPos: {x: -2, y: 1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &7141810549857698684 --- !u!1 &7141810549857698684
GameObject: GameObject:
...@@ -2342,7 +2326,6 @@ MonoBehaviour: ...@@ -2342,7 +2326,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: 0} mapPos: {x: 0, y: 0}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &7422189717627061705 --- !u!1 &7422189717627061705
GameObject: GameObject:
...@@ -2575,7 +2558,6 @@ MonoBehaviour: ...@@ -2575,7 +2558,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -2, y: 0} mapPos: {x: -2, y: 0}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &7560450311381198066 --- !u!1 &7560450311381198066
GameObject: GameObject:
...@@ -2838,7 +2820,6 @@ MonoBehaviour: ...@@ -2838,7 +2820,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: 1} mapPos: {x: -1, y: 1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &8683807963293059402 --- !u!1 &8683807963293059402
GameObject: GameObject:
...@@ -2946,7 +2927,6 @@ MonoBehaviour: ...@@ -2946,7 +2927,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: 2} mapPos: {x: 0, y: 2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &8695425579486219508 --- !u!1 &8695425579486219508
GameObject: GameObject:
...@@ -3054,7 +3034,6 @@ MonoBehaviour: ...@@ -3054,7 +3034,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: 2} mapPos: {x: 2, y: 2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &8852115476851130467 --- !u!1 &8852115476851130467
GameObject: GameObject:
...@@ -3162,7 +3141,6 @@ MonoBehaviour: ...@@ -3162,7 +3141,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 0, y: -1} mapPos: {x: 0, y: -1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &9046791506793280589 --- !u!1 &9046791506793280589
GameObject: GameObject:
...@@ -3270,7 +3248,6 @@ MonoBehaviour: ...@@ -3270,7 +3248,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: -1, y: -2} mapPos: {x: -1, y: -2}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
--- !u!1 &9206324191454810788 --- !u!1 &9206324191454810788
GameObject: GameObject:
...@@ -3378,5 +3355,4 @@ MonoBehaviour: ...@@ -3378,5 +3355,4 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mapPos: {x: 2, y: -1} mapPos: {x: 2, y: -1}
isPassed: 0
isGoalFloor: 0 isGoalFloor: 0
...@@ -253,48 +253,6 @@ PrefabInstance: ...@@ -253,48 +253,6 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1491349555, guid: 06619682524bc5149b5c3092da0722f2, type: 3}
propertyPath: m_Name
value: Add Truth Bullet
objectReference: {fileID: 0}
- target: {fileID: 939019771, guid: 06619682524bc5149b5c3092da0722f2, type: 3}
propertyPath: m_Name
value: Add False Bulltet
objectReference: {fileID: 0}
- target: {fileID: 771201811, guid: 06619682524bc5149b5c3092da0722f2, type: 3}
propertyPath: m_Name
value: Add Mirror Bullet
objectReference: {fileID: 0}
- target: {fileID: 1737354433, guid: 06619682524bc5149b5c3092da0722f2, type: 3}
propertyPath: m_Text
value: Add Mirror Bullet
objectReference: {fileID: 0}
- target: {fileID: 591598819, guid: 06619682524bc5149b5c3092da0722f2, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: AddBulletToPlayer
objectReference: {fileID: 0}
- target: {fileID: 591598819, guid: 06619682524bc5149b5c3092da0722f2, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1491349557, guid: 06619682524bc5149b5c3092da0722f2, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: AddBulletToPlayer
objectReference: {fileID: 0}
- target: {fileID: 1491349557, guid: 06619682524bc5149b5c3092da0722f2, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6056193433934831073, guid: 06619682524bc5149b5c3092da0722f2,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: AddBulletToPlayer
objectReference: {fileID: 0}
- target: {fileID: 6056193433934831073, guid: 06619682524bc5149b5c3092da0722f2,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 06619682524bc5149b5c3092da0722f2, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 06619682524bc5149b5c3092da0722f2, type: 3}
--- !u!1 &797716766 --- !u!1 &797716766
......
...@@ -25,7 +25,7 @@ public class MapManager : SingletonBehaviour<MapManager> ...@@ -25,7 +25,7 @@ public class MapManager : SingletonBehaviour<MapManager>
public void LoadMap(Map _newMap) public void LoadMap(Map _newMap)
{ {
if(currentMap != null) if (currentMap != null)
Destroy(currentMap.gameObject); Destroy(currentMap.gameObject);
currentMap = Instantiate(_newMap); currentMap = Instantiate(_newMap);
currentMap.transform.position = new Vector3(0, 0, 0); currentMap.transform.position = new Vector3(0, 0, 0);
...@@ -33,6 +33,8 @@ public class MapManager : SingletonBehaviour<MapManager> ...@@ -33,6 +33,8 @@ public class MapManager : SingletonBehaviour<MapManager>
GameManager.inst.SetClearIndex(currentMap); GameManager.inst.SetClearIndex(currentMap);
for (int i = 0; i < currentMap.startFloors.Count; i++) for (int i = 0; i < currentMap.startFloors.Count; i++)
PlayerController.inst.CreatePlayer(currentMap.startFloors[i]); PlayerController.inst.CreatePlayer(currentMap.startFloors[i]);
for (int i = 0; i < currentMap.initialBullets.Count; i++)
PlayerController.inst.bulletList.Add(currentMap.initialBullets[i]);
} }
public IEnumerator Rebaker() public IEnumerator Rebaker()
{ {
......
...@@ -14,6 +14,7 @@ public class Map : MonoBehaviour ...@@ -14,6 +14,7 @@ public class Map : MonoBehaviour
public GameObject walls; public GameObject walls;
public GameObject objects; public GameObject objects;
public List<Floor> startFloors; public List<Floor> startFloors;
public List<BulletCode> initialBullets;
public List<ClearCondition> clearConditions; public List<ClearCondition> clearConditions;
......
...@@ -98,7 +98,8 @@ public class MapEditor : SingletonBehaviour<MapEditor> ...@@ -98,7 +98,8 @@ public class MapEditor : SingletonBehaviour<MapEditor>
} }
public void AddBulletToPlayer(int bulletMode) public void AddBulletToPlayer(int bulletMode)
{ {
PlayerController.inst.bulletList.Add((BulletCode)bulletMode); currentMap.initialBullets.Add((BulletCode)bulletMode);
//PlayerController.inst.bulletList.Add((BulletCode)bulletMode);
} }
private void Awake() private void Awake()
...@@ -107,6 +108,7 @@ public class MapEditor : SingletonBehaviour<MapEditor> ...@@ -107,6 +108,7 @@ public class MapEditor : SingletonBehaviour<MapEditor>
isEditorStarted = false; isEditorStarted = false;
isCreateMode = true; isCreateMode = true;
startSigns = new Dictionary<Floor, GameObject>(); startSigns = new Dictionary<Floor, GameObject>();
goalSigns = new Dictionary<Floor, GameObject>();
} }
// Start is called before the first frame update // Start is called before the first frame update
...@@ -189,7 +191,8 @@ public class MapEditor : SingletonBehaviour<MapEditor> ...@@ -189,7 +191,8 @@ public class MapEditor : SingletonBehaviour<MapEditor>
else else
{ {
currentMap.GetFloorAtPos(clickedPos).isGoalFloor = true; currentMap.GetFloorAtPos(clickedPos).isGoalFloor = true;
goalSigns.Add(currentMap.GetFloorAtPos(clickedPos), Instantiate(goalSign)); goalSigns.Add(currentMap.GetFloorAtPos(clickedPos),
Instantiate(goalSign));
goalSigns[currentMap.GetFloorAtPos(clickedPos)].transform.position = new Vector3(clickedPos.x, 2, clickedPos.y); goalSigns[currentMap.GetFloorAtPos(clickedPos)].transform.position = new Vector3(clickedPos.x, 2, clickedPos.y);
} }
} }
......
...@@ -70,16 +70,6 @@ public class PlayerController : SingletonBehaviour<PlayerController> ...@@ -70,16 +70,6 @@ public class PlayerController : SingletonBehaviour<PlayerController>
void Start() void Start()
{ {
prePos = MapPos; prePos = MapPos;
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
} }
// Update is called once per frame // Update is called once per frame
......
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