dd
This commit is contained in:
27
Assets/GameAssets/Maps/1000/XML/MonstersConfig.xml
Normal file
27
Assets/GameAssets/Maps/1000/XML/MonstersConfig.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
|
<config>
|
||||||
|
<Settings mapID="1000" />
|
||||||
|
<MonsterAreas>
|
||||||
|
<MonsterArea itemIdx="1" groupId="-1" id="0" createMode="0" patrolMode="0" indexX="72" indexY="86" radius="1" num="0" delayTime="0" day="0" time="0">
|
||||||
|
<MonsterPaths />
|
||||||
|
</MonsterArea>
|
||||||
|
<MonsterArea itemIdx="2" groupId="-1" id="0" createMode="0" patrolMode="0" indexX="76" indexY="85" radius="1" num="0" delayTime="0" day="0" time="0">
|
||||||
|
<MonsterPaths />
|
||||||
|
</MonsterArea>
|
||||||
|
<MonsterArea itemIdx="3" groupId="-1" id="0" createMode="0" patrolMode="0" indexX="74" indexY="82" radius="1" num="0" delayTime="0" day="0" time="0">
|
||||||
|
<MonsterPaths />
|
||||||
|
</MonsterArea>
|
||||||
|
<MonsterArea itemIdx="-1" groupId="3" id="0" createMode="0" patrolMode="0" indexX="74" indexY="82" radius="0" num="0" delayTime="0" day="0" time="0">
|
||||||
|
<MonsterPaths />
|
||||||
|
</MonsterArea>
|
||||||
|
<MonsterArea itemIdx="-1" groupId="3" id="0" createMode="0" patrolMode="0" indexX="74" indexY="82" radius="0" num="0" delayTime="0" day="0" time="0">
|
||||||
|
<MonsterPaths />
|
||||||
|
</MonsterArea>
|
||||||
|
<MonsterArea itemIdx="-1" groupId="3" id="0" createMode="0" patrolMode="0" indexX="74" indexY="82" radius="0" num="0" delayTime="0" day="0" time="0">
|
||||||
|
<MonsterPaths />
|
||||||
|
</MonsterArea>
|
||||||
|
<MonsterArea itemIdx="-1" groupId="3" id="0" createMode="0" patrolMode="0" indexX="74" indexY="82" radius="0" num="0" delayTime="0" day="0" time="0">
|
||||||
|
<MonsterPaths />
|
||||||
|
</MonsterArea>
|
||||||
|
</MonsterAreas>
|
||||||
|
</config>
|
||||||
7
Assets/GameAssets/Maps/1000/XML/MonstersConfig.xml.meta
Normal file
7
Assets/GameAssets/Maps/1000/XML/MonstersConfig.xml.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 521040d6d88094b428ebf8c1a0dbac02
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -3037,6 +3037,18 @@ MonoBehaviour:
|
|||||||
m_StringArgument:
|
m_StringArgument:
|
||||||
m_BoolArgument: 0
|
m_BoolArgument: 0
|
||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
|
- m_Target: {fileID: 687449961}
|
||||||
|
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||||
|
m_MethodName: SetActive
|
||||||
|
m_Mode: 0
|
||||||
|
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_IsOn: 0
|
m_IsOn: 0
|
||||||
--- !u!1 &154101546
|
--- !u!1 &154101546
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -6623,6 +6635,18 @@ MonoBehaviour:
|
|||||||
m_StringArgument:
|
m_StringArgument:
|
||||||
m_BoolArgument: 0
|
m_BoolArgument: 0
|
||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
|
- m_Target: {fileID: 1286502938}
|
||||||
|
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||||
|
m_MethodName: SetActive
|
||||||
|
m_Mode: 0
|
||||||
|
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_IsOn: 0
|
m_IsOn: 0
|
||||||
--- !u!1 &350730894
|
--- !u!1 &350730894
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -10201,7 +10225,11 @@ Transform:
|
|||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 1287609758}
|
||||||
|
- {fileID: 687449962}
|
||||||
|
- {fileID: 1286502939}
|
||||||
|
- {fileID: 655392906}
|
||||||
m_Father: {fileID: 841691708}
|
m_Father: {fileID: 841691708}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &523688423
|
--- !u!1 &523688423
|
||||||
@@ -12788,6 +12816,37 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 654655632}
|
m_GameObject: {fileID: 654655632}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &655392905
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 655392906}
|
||||||
|
m_Layer: 9
|
||||||
|
m_Name: ReliveArea
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!4 &655392906
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 655392905}
|
||||||
|
serializedVersion: 2
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 519310460}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &673641485
|
--- !u!1 &673641485
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -13013,6 +13072,37 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 676414811}
|
m_GameObject: {fileID: 676414811}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &687449961
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 687449962}
|
||||||
|
m_Layer: 9
|
||||||
|
m_Name: NpcArea
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!4 &687449962
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 687449961}
|
||||||
|
serializedVersion: 2
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 519310460}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &694870550
|
--- !u!1 &694870550
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -16559,12 +16649,19 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: b7cce2a4c6c6cc14f876c47961979fb5, type: 3}
|
m_Script: {fileID: 11500000, guid: b7cce2a4c6c6cc14f876c47961979fb5, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
isDragging: 0
|
||||||
|
downPos: {x: 0, y: 0, z: 0}
|
||||||
|
currentComponent: {fileID: 0}
|
||||||
mapWidth: 0
|
mapWidth: 0
|
||||||
mapHeight: 0
|
mapHeight: 0
|
||||||
_curOpenMapId: 0
|
_curOpenMapId: 0
|
||||||
mapRegionParent: {fileID: 782149589}
|
mapRegionParent: {fileID: 782149589}
|
||||||
mapGridParent: {fileID: 504155531}
|
mapGridParent: {fileID: 504155531}
|
||||||
mapAreaParent: {fileID: 519310460}
|
mapAreaParent: {fileID: 519310460}
|
||||||
|
mapMonsterArea: {fileID: 1287609758}
|
||||||
|
mapNPCArea: {fileID: 687449962}
|
||||||
|
mapTeleportArea: {fileID: 1286502939}
|
||||||
|
mapReliveArea: {fileID: 655392906}
|
||||||
_curMapRegions:
|
_curMapRegions:
|
||||||
regionRowNum: 0
|
regionRowNum: 0
|
||||||
regionColNum: 0
|
regionColNum: 0
|
||||||
@@ -23935,6 +24032,68 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1283425210}
|
m_GameObject: {fileID: 1283425210}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1286502938
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1286502939}
|
||||||
|
m_Layer: 9
|
||||||
|
m_Name: TeleportArea
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!4 &1286502939
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1286502938}
|
||||||
|
serializedVersion: 2
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 519310460}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1287609757
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1287609758}
|
||||||
|
m_Layer: 9
|
||||||
|
m_Name: MonsterArea
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!4 &1287609758
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1287609757}
|
||||||
|
serializedVersion: 2
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 519310460}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1290605789
|
--- !u!1 &1290605789
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -24984,7 +25143,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &1325607736
|
--- !u!224 &1325607736
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -30459,6 +30618,18 @@ MonoBehaviour:
|
|||||||
m_StringArgument:
|
m_StringArgument:
|
||||||
m_BoolArgument: 0
|
m_BoolArgument: 0
|
||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
|
- m_Target: {fileID: 1287609757}
|
||||||
|
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||||
|
m_MethodName: SetActive
|
||||||
|
m_Mode: 0
|
||||||
|
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_IsOn: 0
|
m_IsOn: 0
|
||||||
--- !u!1 &1615225086
|
--- !u!1 &1615225086
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -34973,6 +35144,18 @@ MonoBehaviour:
|
|||||||
m_StringArgument:
|
m_StringArgument:
|
||||||
m_BoolArgument: 0
|
m_BoolArgument: 0
|
||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
|
- m_Target: {fileID: 655392905}
|
||||||
|
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||||
|
m_MethodName: SetActive
|
||||||
|
m_Mode: 0
|
||||||
|
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_IsOn: 0
|
m_IsOn: 0
|
||||||
--- !u!1 &1825064713
|
--- !u!1 &1825064713
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -38941,10 +39124,6 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 16fab2e09ef3ffa4582b982dc9775080, type: 3}
|
m_Script: {fileID: 11500000, guid: 16fab2e09ef3ffa4582b982dc9775080, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
curActiveInput: {fileID: 0}
|
|
||||||
curActiveList: []
|
|
||||||
itemParent: {fileID: 1454471842}
|
|
||||||
btnAdd: {fileID: 1644398427}
|
|
||||||
--- !u!1 &2007759514
|
--- !u!1 &2007759514
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ public partial class MapManager : MonoBehaviour
|
|||||||
|
|
||||||
public void RemoveSpecialPoint(EditCellType cellType, int idx = 0)
|
public void RemoveSpecialPoint(EditCellType cellType, int idx = 0)
|
||||||
{
|
{
|
||||||
|
Transform parentArea = mapAreaParent;
|
||||||
string cellName = string.Empty;
|
string cellName = string.Empty;
|
||||||
switch (cellType)
|
switch (cellType)
|
||||||
{
|
{
|
||||||
@@ -436,6 +436,7 @@ public partial class MapManager : MonoBehaviour
|
|||||||
break;
|
break;
|
||||||
case EditCellType.ReliveCell:
|
case EditCellType.ReliveCell:
|
||||||
cellName = $"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>{_curReliveCenterPoint.areaIdx}";
|
cellName = $"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>{_curReliveCenterPoint.areaIdx}";
|
||||||
|
parentArea = mapReliveArea;
|
||||||
break;
|
break;
|
||||||
case EditCellType.AudioTrigger:
|
case EditCellType.AudioTrigger:
|
||||||
cellName = $"<22><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>{_curAudioTriggerCenterPoint.areaIdx}";
|
cellName = $"<22><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>{_curAudioTriggerCenterPoint.areaIdx}";
|
||||||
@@ -448,6 +449,7 @@ public partial class MapManager : MonoBehaviour
|
|||||||
break;
|
break;
|
||||||
case EditCellType.MonsterArea:
|
case EditCellType.MonsterArea:
|
||||||
cellName = $"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>{_curMonsterPoint.areaIdx}";
|
cellName = $"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>{_curMonsterPoint.areaIdx}";
|
||||||
|
parentArea = mapMonsterArea;
|
||||||
break;
|
break;
|
||||||
case EditCellType.FuBenArea:
|
case EditCellType.FuBenArea:
|
||||||
cellName = $"<22><><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>{_curFuBenPoint.areaIdx}";
|
cellName = $"<22><><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>{_curFuBenPoint.areaIdx}";
|
||||||
@@ -465,9 +467,9 @@ public partial class MapManager : MonoBehaviour
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mapAreaParent.Find(cellName))
|
if (parentArea.Find(cellName))
|
||||||
{
|
{
|
||||||
DestroyImmediate(mapAreaParent.Find(cellName).gameObject);
|
DestroyImmediate(parentArea.Find(cellName).gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void CreateSpecialPoint(int x, int y, EditCellType cellType)
|
public void CreateSpecialPoint(int x, int y, EditCellType cellType)
|
||||||
@@ -475,6 +477,7 @@ public partial class MapManager : MonoBehaviour
|
|||||||
if (_curOpenMapId <= 0)
|
if (_curOpenMapId <= 0)
|
||||||
return;
|
return;
|
||||||
UnityEngine.Object obj = null;
|
UnityEngine.Object obj = null;
|
||||||
|
Transform parentArea = mapAreaParent;
|
||||||
if (cellType < EditCellType.AudioTrigger)
|
if (cellType < EditCellType.AudioTrigger)
|
||||||
obj = null;
|
obj = null;
|
||||||
else if (cellType == EditCellType.AudioTrigger)
|
else if (cellType == EditCellType.AudioTrigger)
|
||||||
@@ -482,14 +485,19 @@ public partial class MapManager : MonoBehaviour
|
|||||||
else if (cellType == EditCellType.TriggerCell)
|
else if (cellType == EditCellType.TriggerCell)
|
||||||
obj = Resources.Load("Prefabs/triggerCenterPoint");
|
obj = Resources.Load("Prefabs/triggerCenterPoint");
|
||||||
else if (cellType == EditCellType.ReliveCell)
|
else if (cellType == EditCellType.ReliveCell)
|
||||||
|
{
|
||||||
obj = Resources.Load("Prefabs/reliveCenterPoint");
|
obj = Resources.Load("Prefabs/reliveCenterPoint");
|
||||||
|
parentArea = mapReliveArea;
|
||||||
|
}
|
||||||
else if (cellType == EditCellType.MonsterArea)
|
else if (cellType == EditCellType.MonsterArea)
|
||||||
|
{
|
||||||
obj = Resources.Load("Prefabs/monsterPoint");
|
obj = Resources.Load("Prefabs/monsterPoint");
|
||||||
|
parentArea = mapMonsterArea;
|
||||||
|
}
|
||||||
else if (cellType == EditCellType.FuBenArea)
|
else if (cellType == EditCellType.FuBenArea)
|
||||||
obj = Resources.Load("Prefabs/fubenPoint");
|
obj = Resources.Load("Prefabs/fubenPoint");
|
||||||
else if (cellType == EditCellType.JuBaoArea)
|
else if (cellType == EditCellType.JuBaoArea)
|
||||||
obj = Resources.Load("Prefabs/jubaoPoint");
|
obj = Resources.Load("Prefabs/jubaoPoint");
|
||||||
|
|
||||||
if (obj == null)
|
if (obj == null)
|
||||||
{
|
{
|
||||||
UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>cell.prefabʧ<62><CAA7>");
|
UIWindow.Instance.ShowMessage("<22><><EFBFBD><EFBFBD>cell.prefabʧ<62><CAA7>");
|
||||||
@@ -530,6 +538,7 @@ public partial class MapManager : MonoBehaviour
|
|||||||
case EditCellType.MonsterArea:
|
case EditCellType.MonsterArea:
|
||||||
cellName = $"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>{_curMonsterPoint.areaIdx}";
|
cellName = $"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>{_curMonsterPoint.areaIdx}";
|
||||||
Idx = _curMonsterPoint.areaIdx;
|
Idx = _curMonsterPoint.areaIdx;
|
||||||
|
if (Idx < 0) return;
|
||||||
break;
|
break;
|
||||||
case EditCellType.FuBenArea:
|
case EditCellType.FuBenArea:
|
||||||
cellName = $"<22><><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>{_curFuBenPoint.areaIdx}";
|
cellName = $"<22><><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>{_curFuBenPoint.areaIdx}";
|
||||||
@@ -550,14 +559,14 @@ public partial class MapManager : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
GameObject go = null;
|
GameObject go = null;
|
||||||
if (mapAreaParent.Find(cellName))
|
if (parentArea.Find(cellName))
|
||||||
{
|
{
|
||||||
go = mapAreaParent.Find(cellName).gameObject;
|
go = parentArea.Find(cellName).gameObject;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
go = Instantiate(obj) as GameObject;
|
go = Instantiate(obj) as GameObject;
|
||||||
go.transform.SetParent(mapAreaParent, false);
|
go.transform.SetParent(parentArea, false);
|
||||||
}
|
}
|
||||||
var sceneArea = go.GetComponent<SceneArea>();
|
var sceneArea = go.GetComponent<SceneArea>();
|
||||||
sceneArea.SetSceneAreaData(cellType, Idx);
|
sceneArea.SetSceneAreaData(cellType, Idx);
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ public partial class MapManager : MonoBehaviour
|
|||||||
|
|
||||||
public Transform mapGridParent;
|
public Transform mapGridParent;
|
||||||
public Transform mapAreaParent;
|
public Transform mapAreaParent;
|
||||||
|
public Transform mapMonsterArea;
|
||||||
|
public Transform mapNPCArea;
|
||||||
|
public Transform mapTeleportArea;
|
||||||
|
public Transform mapReliveArea;
|
||||||
public Dictionary<string, (int maxRow, int maxCol)> allMaps = new Dictionary<string, (int maxRow, int maxCol)>();
|
public Dictionary<string, (int maxRow, int maxCol)> allMaps = new Dictionary<string, (int maxRow, int maxCol)>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ using UnityEngine;
|
|||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using UnityEngine.UIElements;
|
||||||
|
|
||||||
public partial class MapManager : MonoBehaviour
|
public partial class MapManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
@@ -132,6 +133,23 @@ public partial class MapManager : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (_curOpenMapId <= 0)
|
if (_curOpenMapId <= 0)
|
||||||
return;
|
return;
|
||||||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD><D0B3><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>
|
||||||
|
foreach (Transform child in mapMonsterArea)
|
||||||
|
{
|
||||||
|
Destroy(child.gameObject);
|
||||||
|
}
|
||||||
|
foreach (Transform child in mapNPCArea)
|
||||||
|
{
|
||||||
|
Destroy(child.gameObject);
|
||||||
|
}
|
||||||
|
foreach (Transform child in mapTeleportArea)
|
||||||
|
{
|
||||||
|
Destroy(child.gameObject);
|
||||||
|
}
|
||||||
|
foreach (Transform child in mapReliveArea)
|
||||||
|
{
|
||||||
|
Destroy(child.gameObject);
|
||||||
|
}
|
||||||
UIWindow.Instance.uiCellInfo.CloseMap();
|
UIWindow.Instance.uiCellInfo.CloseMap();
|
||||||
UIWindow.Instance.uiMonstersPanel.RemoveAll();
|
UIWindow.Instance.uiMonstersPanel.RemoveAll();
|
||||||
ClearMapRegions();
|
ClearMapRegions();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static MapManager;
|
using static MapManager;
|
||||||
|
using static UnityEditor.PlayerSettings;
|
||||||
|
|
||||||
public class SceneArea : MonoBehaviour
|
public class SceneArea : MonoBehaviour
|
||||||
{
|
{
|
||||||
@@ -18,12 +19,24 @@ public class SceneArea : MonoBehaviour
|
|||||||
public void OnPointerClick()
|
public void OnPointerClick()
|
||||||
{
|
{
|
||||||
Debug.Log($"ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
Debug.Log($"ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
|
||||||
|
switch (editCellType)
|
||||||
|
{
|
||||||
|
case EditCellType.MonsterArea:
|
||||||
|
UIWindow.Instance.uiMonstersPanel.SelectMonsterPos(Idx);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void OnPointerDrag(Vector3 mousePosition)
|
public void OnPointerDrag(Vector3 mousePosition)
|
||||||
{
|
{
|
||||||
Vector2Int pos = MapManager.Instance.map.selector.GetMouseByCell();
|
Vector2Int pos = MapManager.Instance.map.selector.GetMouseByCell();
|
||||||
SetAreaPos(pos);
|
SetAreaPos(pos);
|
||||||
|
switch (editCellType)
|
||||||
|
{
|
||||||
|
case EditCellType.MonsterArea:
|
||||||
|
UIWindow.Instance.uiMonstersPanel.UpdateMonsterPos(Idx,pos);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void OnPointerUp()
|
public void OnPointerUp()
|
||||||
|
|||||||
@@ -78,7 +78,11 @@ public class UIMonsterItem : MonoBehaviour
|
|||||||
MapManager.Instance.CreateSpecialPoint(monster.pos.x, monster.pos.y, MapManager.EditCellType.MonsterArea);
|
MapManager.Instance.CreateSpecialPoint(monster.pos.x, monster.pos.y, MapManager.EditCellType.MonsterArea);
|
||||||
MapManager.Instance.SetCurMonsterPathIdx(pathIdx);
|
MapManager.Instance.SetCurMonsterPathIdx(pathIdx);
|
||||||
}
|
}
|
||||||
|
public void RefreshPos(Vector2Int newPos)
|
||||||
|
{
|
||||||
|
monster.pos = newPos;
|
||||||
|
txtPos.text = newPos.ToString() ;
|
||||||
|
}
|
||||||
public void RefreshItem()
|
public void RefreshItem()
|
||||||
{
|
{
|
||||||
txtMonsterID.text = monster.id.ToString();
|
txtMonsterID.text = monster.id.ToString();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using HxGame.Data;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Threading;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using static System.Net.Mime.MediaTypeNames;
|
using static System.Net.Mime.MediaTypeNames;
|
||||||
@@ -42,13 +43,12 @@ public class UIMonsterPanel : MonoBehaviour
|
|||||||
|
|
||||||
private UIMonsterItem _curMonsterItem;
|
private UIMonsterItem _curMonsterItem;
|
||||||
//private Dictionary<int, List<UIMonsterItem>> _dicGroupItem;
|
//private Dictionary<int, List<UIMonsterItem>> _dicGroupItem;
|
||||||
private Dictionary<int, UIMonsterItem> _dicGroupItem; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>item
|
private Dictionary<int, UIMonsterItem> _dicGroupItem = new(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>item
|
||||||
|
|
||||||
|
private Dictionary<int, UIMonsterItem> _dicAllItem = new(); //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>item
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
itemIdx = 0;
|
itemIdx = 0;
|
||||||
//_dicGroupItem = new Dictionary<int, List<UIMonsterItem>>();
|
|
||||||
_dicGroupItem = new Dictionary<int, UIMonsterItem>();
|
|
||||||
btnClose.onClick.AddListener(OnClickClose);
|
btnClose.onClick.AddListener(OnClickClose);
|
||||||
btnAddGroup.onClick.AddListener(OnAddGroup);
|
btnAddGroup.onClick.AddListener(OnAddGroup);
|
||||||
btnDeleteGroup.onClick.AddListener(OnDeleteGroup);
|
btnDeleteGroup.onClick.AddListener(OnDeleteGroup);
|
||||||
@@ -145,8 +145,6 @@ public class UIMonsterPanel : MonoBehaviour
|
|||||||
item.OnClick = OnClickItem;
|
item.OnClick = OnClickItem;
|
||||||
item.OnCopyItem = OnCopyItem;
|
item.OnCopyItem = OnCopyItem;
|
||||||
item.btnClickSelf.Select();
|
item.btnClickSelf.Select();
|
||||||
|
|
||||||
|
|
||||||
AddGroupMap(_curMonsterItem.monster.itemIdx, _curMonsterItem);
|
AddGroupMap(_curMonsterItem.monster.itemIdx, _curMonsterItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +182,7 @@ public class UIMonsterPanel : MonoBehaviour
|
|||||||
_curMonsterItem.transform.parent.GetComponent<RectTransform>().sizeDelta -= Vector2Int.up * 30;
|
_curMonsterItem.transform.parent.GetComponent<RectTransform>().sizeDelta -= Vector2Int.up * 30;
|
||||||
|
|
||||||
DestroyImmediate(_curMonsterItem.gameObject);
|
DestroyImmediate(_curMonsterItem.gameObject);
|
||||||
|
MapManager.Instance.RemoveMonsterPoint(_curMonsterItem.monster.itemIdx);
|
||||||
_curMonsterItem = null;
|
_curMonsterItem = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,7 +195,6 @@ public class UIMonsterPanel : MonoBehaviour
|
|||||||
UIWindow.Instance.ShowMessage("monsterItem.prefabʧ<62><CAA7>");
|
UIWindow.Instance.ShowMessage("monsterItem.prefabʧ<62><CAA7>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GameObject go = Instantiate(obj) as GameObject; ;
|
GameObject go = Instantiate(obj) as GameObject; ;
|
||||||
go.transform.SetParent(itemParent, false);
|
go.transform.SetParent(itemParent, false);
|
||||||
UIMonsterItem item = go.transform.Find("monsterSubItem").GetComponent<UIMonsterItem>();
|
UIMonsterItem item = go.transform.Find("monsterSubItem").GetComponent<UIMonsterItem>();
|
||||||
@@ -213,6 +210,7 @@ public class UIMonsterPanel : MonoBehaviour
|
|||||||
item.OnCopyItem = OnCopyItem;
|
item.OnCopyItem = OnCopyItem;
|
||||||
_curMonsterItem = item;
|
_curMonsterItem = item;
|
||||||
item.btnClickSelf.Select();
|
item.btnClickSelf.Select();
|
||||||
|
_dicAllItem.Add(monster.itemIdx, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadMonsterConfig(int mapId)
|
public void LoadMonsterConfig(int mapId)
|
||||||
@@ -254,6 +252,7 @@ public class UIMonsterPanel : MonoBehaviour
|
|||||||
item.OnClick = OnClickItem;
|
item.OnClick = OnClickItem;
|
||||||
item.OnCopyItem = OnCopyItem;
|
item.OnCopyItem = OnCopyItem;
|
||||||
_curMonsterItem = item;
|
_curMonsterItem = item;
|
||||||
|
_dicAllItem.Add(monster.itemIdx, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveItem()
|
private void SaveItem()
|
||||||
@@ -440,8 +439,23 @@ public class UIMonsterPanel : MonoBehaviour
|
|||||||
{
|
{
|
||||||
DestroyImmediate(itemParent.GetChild(0).gameObject);
|
DestroyImmediate(itemParent.GetChild(0).gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
_dicGroupItem?.Clear();
|
_dicGroupItem?.Clear();
|
||||||
|
_dicAllItem?.Clear();
|
||||||
itemIdx = 0;
|
itemIdx = 0;
|
||||||
}
|
}
|
||||||
|
public void SelectMonsterPos(int Idx)
|
||||||
|
{
|
||||||
|
if (_dicAllItem.TryGetValue(Idx, out var monsterItem))
|
||||||
|
{
|
||||||
|
monsterItem.btnClickSelf.Select();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void UpdateMonsterPos(int Idx, Vector2Int newPos)
|
||||||
|
{
|
||||||
|
if (_dicAllItem.TryGetValue(Idx, out var monsterItem))
|
||||||
|
{
|
||||||
|
monsterItem.RefreshPos(newPos);
|
||||||
|
monsterItem.btnClickSelf.Select();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user