完善编辑器

This commit is contained in:
tangbin
2025-07-19 12:48:11 +08:00
parent 2df2efaa3e
commit b8b50ec90b
27 changed files with 360 additions and 124 deletions

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<config>
<Settings mapID="1000" mapName="新手村" enterLv="1" returnMapId="1000" returnMapCellPointX="14" returnMapCellPointY="15" roleMode="0" useMode="0" deadFall="0" />
<Teleports />
<ReliveAreas />
<SellAreas />
<AudioTriggers />
<Conditions />
</config>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 93b58679bc15fe0488dcab784fd15c0c
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -2,10 +2,10 @@
<config>
<Settings mapID="1000" />
<Npcs>
<Npc id="1001" indexX="43" indexY="69" dir="3">
<Npc id="1001" indexX="32" indexY="22" dir="3">
<NpcPaths />
</Npc>
<Npc id="1002" indexX="63" indexY="99" dir="3">
<Npc id="1002" indexX="50" indexY="30" dir="3">
<NpcPaths />
</Npc>
</Npcs>

View File

@@ -33,7 +33,6 @@ RectTransform:
- {fileID: 1123819602}
- {fileID: 44044998}
m_Father: {fileID: 44906951}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -119,7 +118,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 10036523}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -198,7 +196,6 @@ RectTransform:
m_Children:
- {fileID: 10036523}
m_Father: {fileID: 569409387}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
@@ -240,7 +237,6 @@ RectTransform:
- {fileID: 1242214530}
- {fileID: 66287009}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -384,7 +380,6 @@ RectTransform:
m_Children:
- {fileID: 451632879}
m_Father: {fileID: 902632145}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -425,7 +420,6 @@ RectTransform:
- {fileID: 569409387}
- {fileID: 902632145}
m_Father: {fileID: 53207931}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -533,7 +527,6 @@ RectTransform:
m_Children:
- {fileID: 1348324665}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -653,7 +646,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 56857591}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0.2}
@@ -729,7 +721,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 53207931}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -811,7 +802,6 @@ RectTransform:
m_Children:
- {fileID: 44906951}
m_Father: {fileID: 66287009}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -902,7 +892,6 @@ RectTransform:
m_Children:
- {fileID: 56857591}
m_Father: {fileID: 66287009}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1027,7 +1016,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 10036523}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
@@ -1103,7 +1091,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 53207931}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -1179,7 +1166,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 124065169}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1259,7 +1245,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 10036523}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1335,7 +1320,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1915637426106650695}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1418,7 +1402,6 @@ RectTransform:
- {fileID: 8819100883495250777}
- {fileID: 3597692181889004371}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1565,7 +1548,6 @@ RectTransform:
- {fileID: 6627527148395860736}
- {fileID: 6627527149226005422}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1709,7 +1691,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148431848232}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1789,7 +1770,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148703973234}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1869,7 +1849,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148703973234}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1949,7 +1928,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148431848232}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2029,7 +2007,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527147599726637}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2112,7 +2089,6 @@ RectTransform:
- {fileID: 6627527147650060478}
- {fileID: 6627527148299068932}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -2237,6 +2213,7 @@ GameObject:
- component: {fileID: 6627527148544709197}
- component: {fileID: 6627527148544709196}
- component: {fileID: 5524743412774425343}
- component: {fileID: -8296123991343308456}
m_Layer: 5
m_Name: npcItem
m_TagString: Untagged
@@ -2263,7 +2240,6 @@ RectTransform:
- {fileID: 6627527148431848232}
- {fileID: 124065169}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
@@ -2320,6 +2296,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 567e2af58f2f31c4b9850a15be88041d, type: 3}
m_Name:
m_EditorClassIdentifier:
btnClickSelf: {fileID: -8296123991343308456}
txtPos: {fileID: 6627527148703973235}
txtID: {fileID: 6627527147599726638}
dropDir: {fileID: 53207932}
@@ -2329,6 +2306,50 @@ MonoBehaviour:
paths: []
itemIdx: 0
pathIdx: 0
--- !u!114 &-8296123991343308456
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6627527148544709186}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
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: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6627527148544709196}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &6627527148703973233
GameObject:
m_ObjectHideFlags: 0
@@ -2363,7 +2384,6 @@ RectTransform:
- {fileID: 6627527147849227952}
- {fileID: 6627527148202749533}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -2507,7 +2527,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527147599726637}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2587,7 +2606,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1915637426106650695}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}

View File

@@ -11,7 +11,8 @@ GameObject:
- component: {fileID: 6717071515578429810}
- component: {fileID: 8439226863583550750}
- component: {fileID: -6541133668508520520}
m_Layer: 0
- component: {fileID: 863824017301583093}
m_Layer: 9
m_Name: reliveCenterPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -74,7 +75,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingOrder: 10
m_Sprite: {fileID: 21300000, guid: d0626f2e8dee1c64d8f0cb34803e0ed7, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
@@ -98,6 +99,52 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: da8bfab8f0be79c4c9e2da7d5086428b, type: 3}
m_Name:
m_EditorClassIdentifier:
Idx: 0
--- !u!61 &863824017301583093
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6889203737953192673}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!1 &8477792397126647139
GameObject:
m_ObjectHideFlags: 0
@@ -109,7 +156,7 @@ GameObject:
- component: {fileID: 1326074118892366365}
- component: {fileID: 7987916927072183810}
- component: {fileID: 4535302910299365366}
m_Layer: 0
m_Layer: 9
m_Name: Txt
m_TagString: Untagged
m_Icon: {fileID: 0}

View File

@@ -33,7 +33,6 @@ RectTransform:
m_Children:
- {fileID: 1348324665}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -155,7 +154,6 @@ RectTransform:
m_Children:
- {fileID: 1926966425}
m_Father: {fileID: 1487672564}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -284,7 +282,6 @@ RectTransform:
- {fileID: 1469477838}
- {fileID: 1487672564}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -419,7 +416,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1926966425}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0.2}
@@ -495,7 +491,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 124065169}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -574,7 +569,6 @@ RectTransform:
m_Children:
- {fileID: 1501223395}
m_Father: {fileID: 1683259333}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
@@ -612,7 +606,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1501223395}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -692,7 +685,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 535206919}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -768,7 +760,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 535206919}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -851,7 +842,6 @@ RectTransform:
- {fileID: 1683259333}
- {fileID: 247577748}
m_Father: {fileID: 535206919}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -959,7 +949,6 @@ RectTransform:
- {fileID: 1908973124}
- {fileID: 1425771078}
m_Father: {fileID: 1364973867}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -1045,7 +1034,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1501223395}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1123,7 +1111,6 @@ RectTransform:
m_Children:
- {fileID: 1364973867}
m_Father: {fileID: 1487672564}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1212,7 +1199,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1501223395}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
@@ -1287,7 +1273,6 @@ RectTransform:
m_Children:
- {fileID: 823296146}
m_Father: {fileID: 247577748}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1328,7 +1313,6 @@ RectTransform:
- {fileID: 7023870247036928739}
- {fileID: 1984635078149956350}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1472,7 +1456,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 104339464804166101}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1555,7 +1538,6 @@ RectTransform:
- {fileID: 6627527148395860736}
- {fileID: 6627527149226005422}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1699,7 +1681,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148703973234}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1779,7 +1760,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148703973234}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1859,7 +1839,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527147599726637}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1920,6 +1899,7 @@ GameObject:
- component: {fileID: 6627527148544709197}
- component: {fileID: 6627527148544709196}
- component: {fileID: 1613291733}
- component: {fileID: 2907347471593708806}
m_Layer: 5
m_Name: reliveItem
m_TagString: Untagged
@@ -1945,7 +1925,6 @@ RectTransform:
- {fileID: 104339464804166101}
- {fileID: 124065169}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
@@ -2002,12 +1981,57 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7cf84b93b7706564baa26b5dd999645f, type: 3}
m_Name:
m_EditorClassIdentifier:
btnClickSelf: {fileID: 2907347471593708806}
dropType: {fileID: 535206920}
txtMapId: {fileID: 6627527147599726638}
txtPos: {fileID: 6627527148703973235}
txtRadius: {fileID: 5563237762418437901}
btnDel: {fileID: 124065170}
reliveIdx: 0
--- !u!114 &2907347471593708806
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6627527148544709186}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
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: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6627527148544709196}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &6627527148703973233
GameObject:
m_ObjectHideFlags: 0
@@ -2042,7 +2066,6 @@ RectTransform:
- {fileID: 6627527147849227952}
- {fileID: 6627527148202749533}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -2186,7 +2209,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527147599726637}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2266,7 +2288,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 104339464804166101}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}

View File

@@ -33,7 +33,6 @@ RectTransform:
m_Children:
- {fileID: 1348324665}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -153,7 +152,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 124065169}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -236,7 +234,6 @@ RectTransform:
- {fileID: 6627527148395860736}
- {fileID: 6627527149226005422}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -380,7 +377,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148431848232}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -460,7 +456,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148703973234}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -540,7 +535,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148703973234}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -620,7 +614,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527148431848232}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -700,7 +693,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527147599726637}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -783,7 +775,6 @@ RectTransform:
- {fileID: 6627527147650060478}
- {fileID: 6627527148299068932}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -908,6 +899,7 @@ GameObject:
- component: {fileID: 6627527148544709197}
- component: {fileID: 6627527148544709196}
- component: {fileID: 1614896115623747148}
- component: {fileID: 7009024203072226810}
m_Layer: 5
m_Name: teleportItem
m_TagString: Untagged
@@ -932,7 +924,6 @@ RectTransform:
- {fileID: 6627527148431848232}
- {fileID: 124065169}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
@@ -994,6 +985,51 @@ MonoBehaviour:
txtNextMapPos: {fileID: 6627527148431848233}
btnDel: {fileID: 124065170}
itemIdx: 0
btnClickSelf: {fileID: 7009024203072226810}
--- !u!114 &7009024203072226810
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6627527148544709186}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
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: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6627527148544709196}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &6627527148703973233
GameObject:
m_ObjectHideFlags: 0
@@ -1028,7 +1064,6 @@ RectTransform:
- {fileID: 6627527147849227952}
- {fileID: 6627527148202749533}
m_Father: {fileID: 6627527148544709187}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1172,7 +1207,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6627527147599726637}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}

View File

@@ -11,7 +11,8 @@ GameObject:
- component: {fileID: 4099380756491963758}
- component: {fileID: 1722030936249948202}
- component: {fileID: -8783427539072640138}
m_Layer: 0
- component: {fileID: 7382030050260684998}
m_Layer: 9
m_Name: teleportPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -74,7 +75,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingOrder: 10
m_Sprite: {fileID: 21300000, guid: d0626f2e8dee1c64d8f0cb34803e0ed7, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
@@ -98,9 +99,52 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: da8bfab8f0be79c4c9e2da7d5086428b, type: 3}
m_Name:
m_EditorClassIdentifier:
baseItem: {fileID: 0}
editCellType: 0
Idx: 0
--- !u!61 &7382030050260684998
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2595697985194683569}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!1 &6937116409768040965
GameObject:
m_ObjectHideFlags: 0
@@ -112,7 +156,7 @@ GameObject:
- component: {fileID: 8146110972431004359}
- component: {fileID: 3500698422573408079}
- component: {fileID: 6971439800053661205}
m_Layer: 0
m_Layer: 9
m_Name: Txt
m_TagString: Untagged
m_Icon: {fileID: 0}

View File

@@ -11,7 +11,7 @@ GameObject:
- component: {fileID: 4099380756491963758}
- component: {fileID: 1722030936249948202}
- component: {fileID: -8783427539072640138}
m_Layer: 0
m_Layer: 9
m_Name: triggerCenterPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -74,7 +74,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_SortingOrder: 10
m_Sprite: {fileID: 21300000, guid: d0626f2e8dee1c64d8f0cb34803e0ed7, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
@@ -98,6 +98,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: da8bfab8f0be79c4c9e2da7d5086428b, type: 3}
m_Name:
m_EditorClassIdentifier:
Idx: 0
--- !u!1 &6937116409768040965
GameObject:
m_ObjectHideFlags: 0
@@ -109,7 +110,7 @@ GameObject:
- component: {fileID: 8146110972431004359}
- component: {fileID: 3500698422573408079}
- component: {fileID: 6971439800053661205}
m_Layer: 0
m_Layer: 9
m_Name: Txt
m_TagString: Untagged
m_Icon: {fileID: 0}

View File

@@ -15564,6 +15564,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d970a84732c6aee47a7a6e995d14671c, type: 3}
m_Name:
m_EditorClassIdentifier:
mapEditorGroup: {fileID: 608171647}
dropMap: {fileID: 1898069113}
--- !u!1 &807645385
GameObject:

View File

@@ -53,4 +53,16 @@ public partial class MapManager : MonoBehaviour
newPosition.y = Mathf.Clamp(y, 0, mapRealHeight);
Camera.main.transform.position = new Vector3(x, y, -10);
}
public Vector2Int GetCameraPos()
{
Vector2Int pos = new Vector2Int();
pos.x = (int)Camera.main.transform.position.x;
pos.y = (int)Camera.main.transform.position.y;
pos.x = Mathf.Clamp(pos.x, 0, (int)mapRealWidth);
pos.y = Mathf.Clamp(pos.y, 0, (int)mapRealHeight);
pos.x = (int)(pos.x / map.sideWidth);
pos.y = (int)(pos.y / map.sideHeight);
return pos;
}
}

View File

@@ -151,7 +151,6 @@ public partial class MapManager : MonoBehaviour
Destroy(child.gameObject);
}
UIWindow.Instance.uiCellInfo.CloseMap();
UIWindow.Instance.uiMonstersPanel.RemoveAll();
ClearMapRegions();
Cleanup();
}
@@ -171,6 +170,8 @@ public partial class MapManager : MonoBehaviour
_StartEditor = false;
_brushRadius = 0;
_brushCellType = CellType.None;
UIWindow.Instance.uiEditMapConfig.Cleanup();
}

View File

@@ -16,8 +16,9 @@ public class UIAudioTriggerItem : UIBaseItem
public int itemIdx;
// Start is called before the first frame update
void Awake()
protected override void Awake()
{
base.Awake();
AddInputNameClickEvent(txtPos);
btnDel.onClick.AddListener(RemoveSelf);
itemIdx = 0;

View File

@@ -1,13 +1,23 @@
using Cysharp.Threading.Tasks.Triggers;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using static MapManager;
public class UIBaseItem : MonoBehaviour
{
public SceneArea sceneArea { get; set; }
public EditCellType editCellType { get; set; }
public Button btnClickSelf; //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
protected virtual void Awake()
{
if (btnClickSelf == null) return;
btnClickSelf.onClick.AddListener(OnClickItemSelf);
}
public virtual void SetItemPos(Vector2Int pos) {
}

View File

@@ -80,7 +80,7 @@ public class UIEditMapConfig : MonoBehaviour
UIWindow.Instance.uiTeleportPanel.RemoveAll();
UIWindow.Instance.uiAudioTriggerPanel.RemoveAll();
UIWindow.Instance.uiSellAreasPanel.RemoveAll();
//UIWindow.Instance.uiMonstersPanel.RemoveAll();
UIWindow.Instance.uiMonstersPanel.RemoveAll();
UIWindow.Instance.uiNpcsPanel.RemoveAll();
UIWindow.Instance.uiTriggersPanel.RemoveAll();
UIWindow.Instance.uiConditionsPanel.RemoveAll();
@@ -116,7 +116,7 @@ public class UIEditMapConfig : MonoBehaviour
else
{
UIWindow.Instance.uiTeleportPanel.gameObject.SetActive(false);
MapManager.Instance.HideSpecialPoint(MapManager.EditCellType.TeleportCell);
MapManager.Instance?.HideSpecialPoint(MapManager.EditCellType.TeleportCell);
}
}
@@ -130,7 +130,7 @@ public class UIEditMapConfig : MonoBehaviour
else
{
UIWindow.Instance.uiRelivesPanel.gameObject.SetActive(false);
MapManager.Instance.HideSpecialPoint(MapManager.EditCellType.ReliveCell);
MapManager.Instance?.HideSpecialPoint(MapManager.EditCellType.ReliveCell);
}
}
@@ -144,7 +144,7 @@ public class UIEditMapConfig : MonoBehaviour
else
{
UIWindow.Instance.uiMonstersPanel.gameObject.SetActive(false);
MapManager.Instance.HideSpecialPoint(MapManager.EditCellType.MonsterArea);
MapManager.Instance?.HideSpecialPoint(MapManager.EditCellType.MonsterArea);
}
}
@@ -158,7 +158,7 @@ public class UIEditMapConfig : MonoBehaviour
else
{
UIWindow.Instance.uiNpcsPanel.gameObject.SetActive(false);
MapManager.Instance.HideSpecialPoint(MapManager.EditCellType.NpcCell);
MapManager.Instance?.HideSpecialPoint(MapManager.EditCellType.NpcCell);
}
}
@@ -172,7 +172,7 @@ public class UIEditMapConfig : MonoBehaviour
else
{
UIWindow.Instance.uiAudioTriggerPanel.gameObject.SetActive(false);
MapManager.Instance.HideSpecialPoint(MapManager.EditCellType.AudioTrigger);
MapManager.Instance?.HideSpecialPoint(MapManager.EditCellType.AudioTrigger);
}
}
@@ -186,7 +186,7 @@ public class UIEditMapConfig : MonoBehaviour
else
{
UIWindow.Instance.uiTriggersPanel.gameObject.SetActive(false);
MapManager.Instance.HideSpecialPoint(MapManager.EditCellType.TriggerCell);
MapManager.Instance?.HideSpecialPoint(MapManager.EditCellType.TriggerCell);
}
}

View File

@@ -21,8 +21,9 @@ public class UIFuBenItem : UIBaseItem
public int itemIdx;
// Start is called before the first frame update
void Awake()
protected override void Awake()
{
base.Awake();
AddInputNameClickEvent(txtPos);
btnDel.onClick.AddListener(RemoveSelf);
itemIdx = 0;

View File

@@ -23,8 +23,9 @@ public class UIJuBaoItem : UIBaseItem
public int itemIdx;
// Start is called before the first frame update
void Awake()
protected override void Awake()
{
base.Awake();
AddInputNameClickEvent(txtPos);
btnDel.onClick.AddListener(RemoveSelf);
itemIdx = 0;

View File

@@ -12,6 +12,7 @@ using UnityEngine.UI;
///<2F><><EFBFBD>ܣ<EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>򿪵<EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>رյ<D8B1>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public class UIMapPanel : MonoBehaviour
{
public ToggleGroup mapEditorGroup;
public Dropdown dropMap;
private int _curOpenMapId;
private bool _saving;
@@ -137,6 +138,10 @@ public class UIMapPanel : MonoBehaviour
{
MapManager.Instance.CloseMap();
_curOpenMapId = -1;
foreach (var toggle in mapEditorGroup.ActiveToggles())
{
toggle.isOn = false;
}
}
public bool HasMap(string mapId)

View File

@@ -27,7 +27,6 @@ public class UIMonsterItem : UIBaseItem
public Button btnDel; //ɾ<><C9BE>
public Button btnCopy; //<2F><><EFBFBD><EFBFBD>
public Button btnHide; //<2F><><EFBFBD><EFBFBD>
public Button btnClickSelf; //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
public List<string> paths;
//public int itemIdx;
public int pathIdx;
@@ -36,12 +35,12 @@ public class UIMonsterItem : UIBaseItem
public MonstersConfig.MonsterConfig monster;
// Start is called before the first frame update
void Awake()
protected override void Awake()
{
base.Awake();
groupId = -1;
btnDel.onClick.AddListener(RemoveSelf);
paths = new List<string>();
btnClickSelf.onClick.AddListener(OnClickSelf);
btnCopy.onClick.AddListener(OnCopySelf);
btnHide.onClick.AddListener(OnHideSelf);
txtPos.onEndEdit.AddListener(OnEndEditPos);
@@ -147,15 +146,6 @@ public class UIMonsterItem : UIBaseItem
}
return true;
}
private void OnClickSelf()
{
if (OnClick == null)
return;
OnClick(this);
OnClickItemSelf();
}
private void OnCopySelf()
{
if (OnCopyItem == null)

View File

@@ -19,8 +19,9 @@ public class UINpcItem : UIBaseItem
public int pathIdx;
// Start is called before the first frame update
void Awake()
protected override void Awake()
{
base.Awake();
AddInputNameClickEvent(txtPos);
AddInputNameClickEvent(txtPath, true);
btnDel.onClick.AddListener(RemoveSelf);
@@ -66,16 +67,17 @@ public class UINpcItem : UIBaseItem
base.SetItemPos(pos);
txtPos.text = pos.ToString();
}
private void RemoveSelf()
{
DestroyImmediate(gameObject);
}
private void OnDestroy()
{
if (sceneArea == null) return;
DestroyImmediate(sceneArea.gameObject);
}
private void RemoveSelf()
{
DestroyImmediate(gameObject);
}
public bool CheckValid()
{
if (string.IsNullOrEmpty(txtID.text))

View File

@@ -35,8 +35,12 @@ public class UINpcsPanel : MonoBehaviour
GameObject go = Instantiate(obj) as GameObject; ;
go.transform.SetParent(itemParent, false);
int size = MapManager.Instance.AddNpcPointSize();
Vector2Int newPos = MapManager.Instance.GetCameraPos();
UINpcItem item = go.GetComponent<UINpcItem>();
item.SetItemPos(newPos);
item.itemIdx = size;
item.editCellType = MapManager.EditCellType.NpcCell;
MapManager.Instance.CreateSpecialPoint(newPos, item);
}
public void AddItem(NpcConfig nc)

View File

@@ -17,8 +17,9 @@ public class UIReliveItem : UIBaseItem
public int reliveIdx;
// Start is called before the first frame update
void Awake()
protected override void Awake()
{
base.Awake();
AddInputNameClickEvent(txtPos);
btnDel.onClick.AddListener(RemoveSelf);
reliveIdx = 0;
@@ -52,7 +53,16 @@ public class UIReliveItem : UIBaseItem
DestroyImmediate(gameObject);
MapManager.Instance.RemoveReliveCenterPoint(reliveIdx);
}
public override void SetItemPos(Vector2Int pos)
{
base.SetItemPos(pos);
txtPos.text = pos.ToString();
}
private void OnDestroy()
{
if (sceneArea == null) return;
DestroyImmediate(sceneArea.gameObject);
}
public bool CheckValid()
{
if (string.IsNullOrEmpty(txtMapId.text))

View File

@@ -25,11 +25,14 @@ public class UIRelivesPanel : MonoBehaviour
UIWindow.Instance.ShowMessage("reliveItem.prefabʧ<62><CAA7>");
return;
}
Vector2Int newPos = MapManager.Instance.GetCameraPos();
GameObject go = Instantiate(obj) as GameObject; ;
go.transform.SetParent(itemParent, false);
UIReliveItem item = go.GetComponent<UIReliveItem>();
item.reliveIdx = itemParent.childCount;
item.editCellType = MapManager.EditCellType.ReliveCell;
item.SetItemPos(newPos);
MapManager.Instance.CreateSpecialPoint(newPos, item);
}
public void AddItem(int reliveType, int mapId, Vector2Int pos, int radius, int realMapId)
@@ -52,7 +55,7 @@ public class UIRelivesPanel : MonoBehaviour
if (mapId != realMapId)
return;
item.editCellType = MapManager.EditCellType.ReliveCell;
MapManager.Instance.SetReliveCenterPoint(item.reliveIdx, radius);
MapManager.Instance.CreateSpecialPoint(pos, item);
}

View File

@@ -15,8 +15,9 @@ public class UISellAreaItem : UIBaseItem
public int itemIdx;
// Start is called before the first frame update
void Awake()
protected override void Awake()
{
base.Awake();
AddInputNameClickEvent(txtPos);
btnDel.onClick.AddListener(RemoveSelf);
itemIdx = 0;

View File

@@ -12,9 +12,9 @@ public class UITeleportItem : UIBaseItem
public InputField txtNextMapPos; //<2F>¼<EFBFBD><C2BC><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>
public Button btnDel; //ɾ<><C9BE>
public int itemIdx;
private void Awake()
protected override void Awake()
{
base.Awake();
AddInputNameClickEvent(txtPos);
//AddInputNameClickEvent(txtNextMapPos);
btnDel.onClick.AddListener(RemoveSelf);
@@ -46,7 +46,16 @@ public class UITeleportItem : UIBaseItem
DestroyImmediate(gameObject);
MapManager.Instance.RemoveTeleportPointSize(itemIdx);
}
public override void SetItemPos(Vector2Int pos)
{
base.SetItemPos(pos);
txtPos.text = pos.ToString();
}
private void OnDestroy()
{
if (sceneArea == null) return;
Destroy(sceneArea.gameObject);
}
public bool CheckValid()
{
if (string.IsNullOrEmpty(txtPos.text))

View File

@@ -24,14 +24,16 @@ public class UITeleportPanel : MonoBehaviour
UIWindow.Instance.ShowMessage("teleportItem.prefabʧ<62><CAA7>");
return;
}
GameObject go = Instantiate(obj) as GameObject; ;
go.transform.SetParent(itemParent, false);
int size = MapManager.Instance.AddTeleportPointSize();
Vector2Int newPos = MapManager.Instance.GetCameraPos();
UITeleportItem item = go.GetComponent<UITeleportItem>();
item.itemIdx = size;
var gridPos = MapManager.Instance.map.selector.getMapGrid(Camera.main.transform.position);
MapManager.Instance.CreateSpecialPoint(gridPos, item);
item.editCellType = MapManager.EditCellType.TeleportCell;
item.SetItemPos(newPos);
MapManager.Instance.CreateSpecialPoint(newPos, item);
}
public void AddItem(Vector2Int pos, int nextMapId, Vector2Int newMapPos)
@@ -52,6 +54,7 @@ public class UITeleportPanel : MonoBehaviour
item.txtPos.text = $"{pos.x},{pos.y}";
item.txtNextMapID.text = nextMapId.ToString();
item.txtNextMapPos.text = $"{newMapPos.x},{newMapPos.y}";
item.editCellType = MapManager.EditCellType.TriggerCell;
MapManager.Instance.CreateSpecialPoint(pos, item);
}

View File

@@ -16,8 +16,9 @@ public class UITriggerItem : UIBaseItem
public Button btnDel; //ɾ<><C9BE>
public int itemIdx;
private void Awake()
protected override void Awake()
{
base.Awake();
AddInputNameClickEvent(txtPos);
btnDel.onClick.AddListener(RemoveSelf);
itemIdx = 0;