맵 배치 중, 포탈 및 부활지점 카메라 회전값 추가
This commit is contained in:
parent
9a1bd93bdb
commit
659213337f
|
|
@ -68,5 +68,4 @@ messageinfo 엄청 느린 버그
|
|||
1챕터 맵 배치
|
||||
- 포탈, 필드보스, 부활의 성소 등
|
||||
|
||||
몬스터 아이템 드랍
|
||||
- 랜덤 백 id 하나면 id 갯수만큼 드랍 확률 적용하고, 높은 등급나올 수도 있는 건가?
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
|
@ -768,9 +768,13 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
material_skybox: {fileID: 0}
|
||||
gos_map: []
|
||||
m_MapZoneData:
|
||||
- go_portal: {fileID: 3857351711068606990}
|
||||
CamRot_Portal: 139
|
||||
go_reincarnation: {fileID: 0}
|
||||
CamRot_Reincarnation: 0
|
||||
go_mazeNextPortal: {fileID: 0}
|
||||
tf_Farmer: {fileID: 0}
|
||||
tf_Obj: []
|
||||
--- !u!1 &4317178472769222773
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3595581076324338189
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -25,8 +25,8 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 192529150411384523}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 45.6, y: 0.01, z: 82}
|
||||
m_LocalRotation: {x: 0, y: 1, z: 0, w: -0.00000004371139}
|
||||
m_LocalPosition: {x: 348.5, y: 0, z: 311.7}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
|
|
@ -507,7 +507,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &6662552769912589700
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -2459,7 +2459,7 @@ Transform:
|
|||
m_GameObject: {fileID: 2138797020834234801}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 106.8, y: 0.01, z: 47.6}
|
||||
m_LocalPosition: {x: 289.6, y: 0, z: 313.8}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
|
@ -6004,7 +6004,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0.01}
|
||||
m_SizeDelta: {x: 20, y: 5}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!23 &2046876413804770425
|
||||
|
|
@ -7243,7 +7243,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &8543470032144370301
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -74808,22 +74808,30 @@ MonoBehaviour:
|
|||
gos_map: []
|
||||
m_MapZoneData:
|
||||
- go_portal: {fileID: 8476541562843838668}
|
||||
CamRot_Portal: 180
|
||||
go_reincarnation: {fileID: 7009224645035716568}
|
||||
CamRot_Reincarnation: 114
|
||||
go_mazeNextPortal: {fileID: 0}
|
||||
tf_Farmer: {fileID: 0}
|
||||
tf_Obj: []
|
||||
- go_portal: {fileID: 3185639606162375109}
|
||||
CamRot_Portal: 0
|
||||
go_reincarnation: {fileID: 64503766660398176}
|
||||
CamRot_Reincarnation: 0
|
||||
go_mazeNextPortal: {fileID: 0}
|
||||
tf_Farmer: {fileID: 0}
|
||||
tf_Obj: []
|
||||
- go_portal: {fileID: 3459536845717747619}
|
||||
CamRot_Portal: 0
|
||||
go_reincarnation: {fileID: 6224899373660981336}
|
||||
CamRot_Reincarnation: 0
|
||||
go_mazeNextPortal: {fileID: 0}
|
||||
tf_Farmer: {fileID: 0}
|
||||
tf_Obj: []
|
||||
- go_portal: {fileID: 3898265851319238322}
|
||||
CamRot_Portal: 0
|
||||
go_reincarnation: {fileID: 7721901620699796545}
|
||||
CamRot_Reincarnation: 0
|
||||
go_mazeNextPortal: {fileID: 0}
|
||||
tf_Farmer: {fileID: 0}
|
||||
tf_Obj: []
|
||||
|
|
@ -76801,7 +76809,7 @@ PrefabInstance:
|
|||
- target: {fileID: 960630095900046633, guid: 73c6a05b987c3214f9d0c6ae8a803da6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 58.4
|
||||
value: 375
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 960630095900046633, guid: 73c6a05b987c3214f9d0c6ae8a803da6,
|
||||
type: 3}
|
||||
|
|
@ -76811,7 +76819,7 @@ PrefabInstance:
|
|||
- target: {fileID: 960630095900046633, guid: 73c6a05b987c3214f9d0c6ae8a803da6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 34.2
|
||||
value: 343.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 960630095900046633, guid: 73c6a05b987c3214f9d0c6ae8a803da6,
|
||||
type: 3}
|
||||
|
|
@ -77631,17 +77639,17 @@ PrefabInstance:
|
|||
- target: {fileID: 2568772404183619721, guid: 04fd9463276c5ee4383dd9d61e358226,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 29.71
|
||||
value: 311.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2568772404183619721, guid: 04fd9463276c5ee4383dd9d61e358226,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.14
|
||||
value: 1.12
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2568772404183619721, guid: 04fd9463276c5ee4383dd9d61e358226,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 36.13
|
||||
value: 329.9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2568772404183619721, guid: 04fd9463276c5ee4383dd9d61e358226,
|
||||
type: 3}
|
||||
|
|
|
|||
|
|
@ -206,33 +206,19 @@ public class PCActor : MyActor
|
|||
Camera.main.fieldOfView = 60f;
|
||||
LoadMapMgr.Ins.Get_PortalPos(MyValue.MyChoiceMapData, portalpos =>
|
||||
{
|
||||
MyValue.m_RealCamera.Set_Target(transform, Get_RealCamRotAround(portalpos));
|
||||
var mzd = LoadMapMgr.Ins.Get_MapZoneData(MyValue.MyChoiceMapData);
|
||||
MyValue.m_RealCamera.Set_Target(transform, mzd.CamRot_Portal);
|
||||
actGetPos?.Invoke(portalpos);
|
||||
});
|
||||
}
|
||||
float Get_RealCamRotAround(Vector3 portalpos)
|
||||
{
|
||||
if (InGameInfo.Ins.IsGameMode(eGameMode.Lobby))
|
||||
return 139f;
|
||||
else if (InGameInfo.Ins.IsGameMode(eGameMode.Dungeon))
|
||||
{
|
||||
switch (MyValue.MyChoiceMapData.Get_MapData().e_Dungeon)
|
||||
{
|
||||
case eDungeon.d1_Mimic:
|
||||
break;
|
||||
case eDungeon.d2_Maze: return 320f;
|
||||
case eDungeon.d3_Nightmare:
|
||||
break;
|
||||
case eDungeon.d4_Wave:
|
||||
break;
|
||||
}
|
||||
}
|
||||
//Vector3 targetPosition = portalpos;
|
||||
//Vector3 cameraPosition = portalpos - Vector3.forward; // 현재 카메라의 위치
|
||||
|
||||
Vector3 targetPosition = portalpos;
|
||||
Vector3 cameraPosition = portalpos - Vector3.forward; // 현재 카메라의 위치
|
||||
|
||||
Vector3 relativePosition = targetPosition - cameraPosition;
|
||||
return Mathf.Atan2(relativePosition.x, relativePosition.z) * Mathf.Rad2Deg;
|
||||
//Vector3 relativePosition = targetPosition - cameraPosition;
|
||||
//return Mathf.Atan2(relativePosition.x, relativePosition.z) * Mathf.Rad2Deg;
|
||||
return 0f;
|
||||
}
|
||||
public override void Get_Damage(DamageInfo _dinfo)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,29 +22,32 @@ public class LoadMapMgr : MonoBehaviourSingletonTemplate<LoadMapMgr>
|
|||
});
|
||||
}
|
||||
|
||||
public MapZoneData Get_MapZoneData(ChoiceMapData data) { return m_MapData.Get_MapZoneData(data.n_PortalIndex); }
|
||||
|
||||
public void Get_PortalPos(ChoiceMapData data, Action<Vector3> action)
|
||||
{ StartCoroutine(Co_Get_PortalPos(data, action)); }
|
||||
IEnumerator Co_Get_PortalPos(ChoiceMapData data, Action<Vector3> action)
|
||||
{
|
||||
while (DSUtil.CheckNull(m_MapData)) yield return null;
|
||||
action(m_MapData.Get_MapZoneData(data.n_PortalIndex).go_portal.transform.position + Vector3.forward);
|
||||
action(Get_MapZoneData(data).go_portal.transform.position + Vector3.forward);
|
||||
}
|
||||
public Vector3 Get_ReincanationPos(ChoiceMapData data)
|
||||
{ return m_MapData.Get_MapZoneData(data.n_PortalIndex).go_reincarnation.transform.position + Vector3.forward; }
|
||||
{ return Get_MapZoneData(data).go_reincarnation.transform.position + Vector3.forward; }
|
||||
public void Get_tfFarmer(ChoiceMapData data, Action<Transform> action)
|
||||
{ StartCoroutine(Co_Get_tfFarmer(data, action)); }
|
||||
IEnumerator Co_Get_tfFarmer(ChoiceMapData data, Action<Transform> action)
|
||||
{
|
||||
while (DSUtil.CheckNull(m_MapData)) yield return null;
|
||||
action(m_MapData.Get_MapZoneData(data.n_PortalIndex).tf_Farmer);
|
||||
action(Get_MapZoneData(data).tf_Farmer);
|
||||
}
|
||||
public void Get_tfObj(ChoiceMapData data, int index, Action<Transform> action)
|
||||
{ StartCoroutine(Co_Get_tfObj(data, index, action)); }
|
||||
IEnumerator Co_Get_tfObj(ChoiceMapData data, int index, Action<Transform> action)
|
||||
{
|
||||
while (DSUtil.CheckNull(m_MapData)) yield return null;
|
||||
action(m_MapData.Get_MapZoneData(data.n_PortalIndex).tf_Obj[index]);
|
||||
action(Get_MapZoneData(data).tf_Obj[index]);
|
||||
}
|
||||
|
||||
public void Set_MazeMap(int index) { StartCoroutine(Co_Set_MazeMap(index)); }
|
||||
IEnumerator Co_Set_MazeMap(int index)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@ public class MapData : MonoBehaviour
|
|||
public class MapZoneData
|
||||
{
|
||||
public GameObject go_portal;
|
||||
public float CamRot_Portal;
|
||||
public GameObject go_reincarnation;
|
||||
public float CamRot_Reincarnation;
|
||||
public GameObject go_mazeNextPortal;
|
||||
public Transform tf_Farmer;
|
||||
public Transform[] tf_Obj;
|
||||
|
|
|
|||
Loading…
Reference in New Issue