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

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

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