Commit e4373b4d authored by 18손재민's avatar 18손재민

모든 오브젝트에 대응되게 생성이 가능해짐.

parent d82ca6dd
...@@ -44,23 +44,29 @@ MonoBehaviour: ...@@ -44,23 +44,29 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
isMapEditingOn: 0 isMapEditingOn: 0
surface: {fileID: 0}
currentMap: {fileID: 0}
floor: {fileID: 19711883686801522, guid: 71931eea896a59a4683986cfd369b8ee, type: 3} floor: {fileID: 19711883686801522, guid: 71931eea896a59a4683986cfd369b8ee, type: 3}
normalWall: {fileID: 2953616027608884528, guid: a4dcd71ec9f819f4e88c7b5ac24f4b0d, normalWall: {fileID: 2953616027608884528, guid: a4dcd71ec9f819f4e88c7b5ac24f4b0d,
type: 3} type: 3}
mirror: {fileID: 17874052963739924, guid: 90282f1c82fff7545962b5ca66f1a102, type: 3} mirror: {fileID: 17874052963739924, guid: 90282f1c82fff7545962b5ca66f1a102, type: 3}
objects:
- {fileID: 2534561534465535505, guid: 0b323beb318071144aef94132be66541, type: 3}
- {fileID: 6001025753464815805, guid: df6f1d8b9377ec346af4255abe290fbb, type: 3}
- {fileID: 33432975985984805, guid: ec20e06c4a993924791d02d7a4c9375c, type: 3}
truthBullet: {fileID: 7554112578236620015, guid: 356d6cdfb01c9a24bb36c0871000d504, truthBullet: {fileID: 7554112578236620015, guid: 356d6cdfb01c9a24bb36c0871000d504,
type: 3} type: 3}
fakeBullet: {fileID: 5866539243986221368, guid: a1830defb592fe841ab1732fd18f73a1, fakeBullet: {fileID: 5866539243986221368, guid: a1830defb592fe841ab1732fd18f73a1,
type: 3} type: 3}
mirrorBullet: {fileID: 3200095709359611570, guid: bb70103aa487bc346a6df423335477a2, mirrorBullet: {fileID: 3200095709359611570, guid: bb70103aa487bc346a6df423335477a2,
type: 3} type: 3}
briefCase: {fileID: 2534561534465535505, guid: 0b323beb318071144aef94132be66541,
type: 3}
cameraTurret: {fileID: 6001025753464815805, guid: df6f1d8b9377ec346af4255abe290fbb,
type: 3}
mannequins:
- {fileID: 2817243128983163806, guid: 4a442e968e3ddd3468104f4179c3b880, type: 3}
- {fileID: 4555134343764048990, guid: 72682f7503996bc4e988ed5ba93fb688, type: 3}
- {fileID: 6840018466224391531, guid: d7070c786deaa3a4082f9339da091b46, type: 3}
- {fileID: 6169104080419908266, guid: 420a4f921e52a4141b80a3eefcd511e6, type: 3}
- {fileID: 87051754405567689, guid: 2a2831d520acdd3408d8a04673423e2a, type: 3}
players: [] players: []
player: {fileID: 494213313239918027, guid: 449b2ca4d925da541bb45c84b63aab98, type: 3} player: {fileID: 494213313239918027, guid: 449b2ca4d925da541bb45c84b63aab98, type: 3}
currentMap: {fileID: 0}
surface: {fileID: 0}
stage: stage:
- {fileID: 2496973653136699540, guid: dbb2e09c19fe5ad49b11a6b95e5ac9e8, type: 3} - {fileID: 2496973653136699540, guid: dbb2e09c19fe5ad49b11a6b95e5ac9e8, type: 3}
...@@ -11,6 +11,7 @@ GameObject: ...@@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 2534561534465045041} - component: {fileID: 2534561534465045041}
- component: {fileID: 2534561534464242193} - component: {fileID: 2534561534464242193}
- component: {fileID: 2534561534463275217} - component: {fileID: 2534561534463275217}
- component: {fileID: -4559840392902712278}
m_Layer: 0 m_Layer: 0
m_Name: case m_Name: case
m_TagString: Untagged m_TagString: Untagged
...@@ -67,6 +68,7 @@ MeshRenderer: ...@@ -67,6 +68,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0} m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1 m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0 m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0 m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0 m_ImportantGI: 0
...@@ -79,3 +81,16 @@ MeshRenderer: ...@@ -79,3 +81,16 @@ MeshRenderer:
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
--- !u!114 &-4559840392902712278
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2534561534465535505}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 821171481de43df46b274296d8061cb5, type: 3}
m_Name:
m_EditorClassIdentifier:
floor: {fileID: 0}
This diff is collapsed.
...@@ -193,7 +193,7 @@ Light: ...@@ -193,7 +193,7 @@ Light:
m_BounceIntensity: 1 m_BounceIntensity: 1
m_ColorTemperature: 6570 m_ColorTemperature: 6570
m_UseColorTemperature: 0 m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: -2.0000007, y: 2.66e-43, z: 0.0000000030205385, w: 0} m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0 m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0 m_ShadowRadius: 0
m_ShadowAngle: 0 m_ShadowAngle: 0
...@@ -211,6 +211,138 @@ Transform: ...@@ -211,6 +211,138 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &378911349
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 378911350}
- component: {fileID: 378911353}
- component: {fileID: 378911352}
- component: {fileID: 378911351}
m_Layer: 5
m_Name: mannequin adder (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &378911350
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 378911349}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -9.987072}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1765757790}
m_Father: {fileID: 1111451495}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: -838.99994, y: 677.6}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &378911351
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 378911349}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Highlighted
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 378911352}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1372084264}
m_MethodName: AddWhiteMannequin
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &378911352
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 378911349}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!222 &378911353
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 378911349}
m_CullTransparentMesh: 0
--- !u!1 &448150607 --- !u!1 &448150607
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -417,6 +549,103 @@ MonoBehaviour: ...@@ -417,6 +549,103 @@ MonoBehaviour:
m_BeforeTransparentBundles: [] m_BeforeTransparentBundles: []
m_BeforeStackBundles: [] m_BeforeStackBundles: []
m_AfterStackBundles: [] m_AfterStackBundles: []
--- !u!4 &1111451495 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2610587022237466576, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
m_PrefabInstance: {fileID: 1444571407246859822}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1372084264 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1615184088, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
m_PrefabInstance: {fileID: 1444571407246859822}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9b8e1e408cd84db4583dba90a6a06169, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1765757789
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1765757790}
- component: {fileID: 1765757792}
- component: {fileID: 1765757791}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1765757790
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1765757789}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 378911350}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1765757791
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1765757789}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: add mannequin
--- !u!222 &1765757792
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1765757789}
m_CullTransparentMesh: 0
--- !u!114 &2102809461 stripped --- !u!114 &2102809461 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7277015661519863741, guid: 20dee07e28273f049a9093ae4453912f, m_CorrespondingSourceObject: {fileID: 7277015661519863741, guid: 20dee07e28273f049a9093ae4453912f,
...@@ -631,10 +860,20 @@ PrefabInstance: ...@@ -631,10 +860,20 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1444571407667829093, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f, - target: {fileID: 662854970123248673, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3} type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_RootOrder
value: 0 value: 3
objectReference: {fileID: 0}
- target: {fileID: 5969887792022083856, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: AddWhiteMannequin
objectReference: {fileID: 0}
- target: {fileID: 3607742851661074864, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f, type: 3}
......
...@@ -54,6 +54,7 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor ...@@ -54,6 +54,7 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
public void Init(Floor floor) public void Init(Floor floor)
{ {
this.floor = floor; this.floor = floor;
transform.Rotate(new Vector3(0, Random.Range(0, 4) * 90, 0));
} }
public void SetColor(bool isWhite) public void SetColor(bool isWhite)
......
...@@ -203,7 +203,7 @@ public class Map : MonoBehaviour ...@@ -203,7 +203,7 @@ public class Map : MonoBehaviour
/// </summary> /// </summary>
/// <param name="pos">Position of object.</param> /// <param name="pos">Position of object.</param>
/// <param name="objType">Type of object.</param> /// <param name="objType">Type of object.</param>
public void CreateObject(Vector2Int pos, ObjType objType) public void CreateObject(Vector2Int pos, ObjType objType, bool isWhite = true)
{ {
if ((pos.x >= 0 ? (pos.x > maxMapSize / 2) : (pos.x < -maxMapSize / 2)) || (pos.y >= 0 ? (pos.y > maxMapSize / 2) : (pos.y < -maxMapSize / 2))) if ((pos.x >= 0 ? (pos.x > maxMapSize / 2) : (pos.x < -maxMapSize / 2)) || (pos.y >= 0 ? (pos.y > maxMapSize / 2) : (pos.y < -maxMapSize / 2)))
{ {
...@@ -212,7 +212,19 @@ public class Map : MonoBehaviour ...@@ -212,7 +212,19 @@ public class Map : MonoBehaviour
} }
if (!objectGrid.ContainsKey(pos)) if (!objectGrid.ContainsKey(pos))
{ {
objectGrid.Add(pos, Instantiate(MapManager.inst.objects[(int)objType - 1], new Vector3(pos.x, 0, pos.y), Quaternion.identity, objects.transform).GetComponent<IObject>()); switch (objType)
{
case ObjType.Briefcase:
objectGrid.Add(pos, Instantiate(MapManager.inst.briefCase, new Vector3(pos.x, 0, pos.y), Quaternion.identity, objects.transform).GetComponent<IObject>());
break;
case ObjType.Camera:
objectGrid.Add(pos, Instantiate(MapManager.inst.cameraTurret, new Vector3(pos.x, 0, pos.y), Quaternion.identity, objects.transform).GetComponent<IObject>());
break;
case ObjType.Mannequin:
objectGrid.Add(pos, Instantiate(MapManager.inst.mannequins[Random.Range(0, 5)], new Vector3(pos.x, 0, pos.y), Quaternion.identity, objects.transform).GetComponent<IObject>());
objectGrid[pos].GetObject().GetComponent<Mannequin>().SetColor(isWhite);
break;
}
objectGrid[pos].Init(GetFloorAtPos(pos)); objectGrid[pos].Init(GetFloorAtPos(pos));
StartCoroutine(MapManager.inst.Rebaker()); StartCoroutine(MapManager.inst.Rebaker());
} }
......
...@@ -7,16 +7,19 @@ using UnityEngine.AI; ...@@ -7,16 +7,19 @@ using UnityEngine.AI;
public class MapManager : SingletonBehaviour<MapManager> public class MapManager : SingletonBehaviour<MapManager>
{ {
public bool isMapEditingOn; public bool isMapEditingOn;
public NavMeshSurface surface;
public Map currentMap;
[Header("Instances")] [Header("Instances")]
public Floor floor; public Floor floor;
public NormalWall normalWall; public NormalWall normalWall;
public Mirror mirror; public Mirror mirror;
public GameObject[] objects;
public GameObject truthBullet, fakeBullet, mirrorBullet; public GameObject truthBullet, fakeBullet, mirrorBullet;
[Tooltip("Objects without mannequin.")]
public GameObject briefCase;
public GameObject cameraTurret;
public GameObject[] mannequins;
public List<GameObject> players; public List<GameObject> players;
public GameObject player; public GameObject player;
public Map currentMap;
public NavMeshSurface surface;
public Map[] stage; public Map[] stage;
public BulletFactory bulletFactory; public BulletFactory bulletFactory;
......
...@@ -45,10 +45,8 @@ public class PlayerController : SingletonBehaviour<PlayerController> ...@@ -45,10 +45,8 @@ public class PlayerController : SingletonBehaviour<PlayerController>
int goalFloorCount = 0; int goalFloorCount = 0;
foreach (GameObject child in MapManager.inst.players) foreach (GameObject child in MapManager.inst.players)
{ {
Debug.Log("df");
if (child.GetComponent<Player>().currentFloor.isGoalFloor) if (child.GetComponent<Player>().currentFloor.isGoalFloor)
goalFloorCount++; goalFloorCount++;
Debug.Log(goalFloorCount);
} }
if (GameManager.aFloor >= 0) if (GameManager.aFloor >= 0)
{ {
......
...@@ -5,42 +5,44 @@ using UnityEngine.UI; ...@@ -5,42 +5,44 @@ using UnityEngine.UI;
public class TestTools : MonoBehaviour public class TestTools : MonoBehaviour
{ {
public InputField floorXInput, floorYInput;
public InputField wallXInput, wallYInput;
public InputField objectXInput, objectYInput;
public Text currentBullet; public Text currentBullet;
public InputField xInput, yInput;
public void AddFloor() public void AddFloor()
{ {
MapManager.inst.currentMap.CreateFloor(new Vector2Int(int.Parse(floorXInput.text), int.Parse(floorYInput.text))); MapManager.inst.currentMap.CreateFloor(new Vector2Int(int.Parse(xInput.text), int.Parse(yInput.text)));
} }
public void RemoveFloor() public void RemoveFloor()
{ {
MapManager.inst.currentMap.RemoveFloor(new Vector2Int(int.Parse(floorXInput.text), int.Parse(floorYInput.text))); MapManager.inst.currentMap.RemoveFloor(new Vector2Int(int.Parse(xInput.text), int.Parse(yInput.text)));
} }
public void AddWall() public void AddWall()
{ {
MapManager.inst.currentMap.CreateWall(new Vector2(float.Parse(wallXInput.text), float.Parse(wallYInput.text)), WallType.Normal); MapManager.inst.currentMap.CreateWall(new Vector2(float.Parse(xInput.text), float.Parse(yInput.text)), WallType.Normal);
} }
public void RemoveWall() public void RemoveWall()
{ {
MapManager.inst.currentMap.RemoveWall(new Vector2(float.Parse(wallXInput.text), float.Parse(wallYInput.text))); MapManager.inst.currentMap.RemoveWall(new Vector2(float.Parse(xInput.text), float.Parse(yInput.text)));
}
public void AddTurret()
{
MapManager.inst.currentMap.CreateObject(new Vector2Int(int.Parse(xInput.text), int.Parse(yInput.text)), ObjType.Camera);
} }
public void AddCase() public void AddCase()
{ {
MapManager.inst.currentMap.CreateObject(new Vector2Int(int.Parse(objectXInput.text), int.Parse(objectYInput.text)), ObjType.Briefcase); MapManager.inst.currentMap.CreateObject(new Vector2Int(int.Parse(xInput.text), int.Parse(yInput.text)), ObjType.Briefcase);
} }
public void AddTurret() public void AddBlackMannequin()
{ {
MapManager.inst.currentMap.CreateObject(new Vector2Int(int.Parse(objectXInput.text), int.Parse(objectYInput.text)), ObjType.Camera); MapManager.inst.currentMap.CreateObject(new Vector2Int(int.Parse(xInput.text), int.Parse(yInput.text)), ObjType.Mannequin, false);
} }
public void AddMannequin() public void AddWhiteMannequin()
{ {
MapManager.inst.currentMap.CreateObject(new Vector2Int(int.Parse(objectXInput.text), int.Parse(objectYInput.text)), ObjType.Mannequin); MapManager.inst.currentMap.CreateObject(new Vector2Int(int.Parse(xInput.text), int.Parse(yInput.text)), ObjType.Mannequin, true);
} }
public void RemoveObject() public void RemoveObject()
{ {
MapManager.inst.currentMap.RemoveObject(new Vector2Int(int.Parse(objectXInput.text), int.Parse(objectYInput.text))); MapManager.inst.currentMap.RemoveObject(new Vector2Int(int.Parse(xInput.text), int.Parse(yInput.text)));
} }
public void SaveMap() public void SaveMap()
......
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