战斗逻辑,装备系统,人物界面逻辑修改
This commit is contained in:
parent
61d7ec914f
commit
87978940ad
8
Assets/ArtRes/Excel.meta
Normal file
8
Assets/ArtRes/Excel.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d7f6fd7d87aa994f9624298aed985fe
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/ArtRes/Excel/EquipInfo.xlsx
Normal file
BIN
Assets/ArtRes/Excel/EquipInfo.xlsx
Normal file
Binary file not shown.
7
Assets/ArtRes/Excel/EquipInfo.xlsx.meta
Normal file
7
Assets/ArtRes/Excel/EquipInfo.xlsx.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e32057e894c02e445afdc4469db9f2c3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/ArtRes/Excel/GoodsInfo.xlsx
Normal file
BIN
Assets/ArtRes/Excel/GoodsInfo.xlsx
Normal file
Binary file not shown.
7
Assets/ArtRes/Excel/GoodsInfo.xlsx.meta
Normal file
7
Assets/ArtRes/Excel/GoodsInfo.xlsx.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31d8c2ff33162664cb13d16355947f8c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/ArtRes/Excel/MonsterInfo.xlsx
Normal file
BIN
Assets/ArtRes/Excel/MonsterInfo.xlsx
Normal file
Binary file not shown.
7
Assets/ArtRes/Excel/MonsterInfo.xlsx.meta
Normal file
7
Assets/ArtRes/Excel/MonsterInfo.xlsx.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b350ac17e93723f49b3e6e6e203dedd9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/ArtRes/Excel/UserUpgradeInfo.xlsx
Normal file
BIN
Assets/ArtRes/Excel/UserUpgradeInfo.xlsx
Normal file
Binary file not shown.
7
Assets/ArtRes/Excel/UserUpgradeInfo.xlsx.meta
Normal file
7
Assets/ArtRes/Excel/UserUpgradeInfo.xlsx.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc7e2caa17744084084b3c6a64257706
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
159
Assets/Resources/Object/AddGasNum.prefab
Normal file
159
Assets/Resources/Object/AddGasNum.prefab
Normal file
@ -0,0 +1,159 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6041506937056963377
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3475276476669383820}
|
||||
- component: {fileID: 4672929162443022067}
|
||||
- component: {fileID: 1755109133684161900}
|
||||
- component: {fileID: 1516861279282061045}
|
||||
- component: {fileID: 6935337132290820476}
|
||||
- component: {fileID: 6209111491005302280}
|
||||
- component: {fileID: 7406806604255237352}
|
||||
- component: {fileID: 1025759763430808760}
|
||||
m_Layer: 0
|
||||
m_Name: AddGasNum
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3475276476669383820
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
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: 0}
|
||||
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}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4672929162443022067
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1755109133684161900
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.3254902, g: 1, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: d33a6853c6fa1394e84d986a286b6f79, type: 3}
|
||||
m_FontSize: 60
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 4
|
||||
m_MaxSize: 60
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u7075\u6C14+5"
|
||||
--- !u!114 &1516861279282061045
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 2
|
||||
--- !u!114 &6935337132290820476
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.78431374}
|
||||
m_EffectDistance: {x: 2, y: -2}
|
||||
m_UseGraphicAlpha: 1
|
||||
--- !u!225 &6209111491005302280
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 1
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!114 &7406806604255237352
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3678c4bb02be8674cb275427847ca801, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
maxNum: 10
|
||||
--- !u!114 &1025759763430808760
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 649974ccd78208e4a89608a4c7dcc36d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
txtInfo: {fileID: 1755109133684161900}
|
||||
moveSpeed: 200
|
||||
moveOffset: 200
|
||||
hideSpeed: 2
|
||||
rec: {fileID: 3475276476669383820}
|
||||
can: {fileID: 6209111491005302280}
|
7
Assets/Resources/Object/AddGasNum.prefab.meta
Normal file
7
Assets/Resources/Object/AddGasNum.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27bf94fa72e542848b9266633209615c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -78,7 +78,7 @@ MonoBehaviour:
|
||||
m_BestFit: 0
|
||||
m_MinSize: 4
|
||||
m_MaxSize: 60
|
||||
m_Alignment: 0
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
|
@ -118,7 +118,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
rec: {fileID: 974599524445061421}
|
||||
moveSpeed: 600
|
||||
moveSpeed: 800
|
||||
--- !u!114 &6555612835496151917
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
220
Assets/Resources/Object/TipTool.prefab
Normal file
220
Assets/Resources/Object/TipTool.prefab
Normal file
@ -0,0 +1,220 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2355055011407297045
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2355055011407297046}
|
||||
- component: {fileID: 2355055011407297048}
|
||||
- component: {fileID: 2355055011407297047}
|
||||
- component: {fileID: 2137797734135629945}
|
||||
m_Layer: 0
|
||||
m_Name: txtInfo
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2355055011407297046
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011407297045}
|
||||
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: 2355055011698226079}
|
||||
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.0008544922, y: -0.0011901855}
|
||||
m_SizeDelta: {x: 0.73999023, y: 0.58999634}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2355055011407297048
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011407297045}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2355055011407297047
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011407297045}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.8039216, g: 0.85490197, b: 0.8117647, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: d33a6853c6fa1394e84d986a286b6f79, type: 3}
|
||||
m_FontSize: 50
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 5
|
||||
m_MaxSize: 50
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u63D0\u5347\u5730\u56FE\u6309\u94AE\u88AB\u70B9\u51FB\u4E86"
|
||||
--- !u!114 &2137797734135629945
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011407297045}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0.21176471, g: 0.13333334, b: 0.06666667, a: 0.39215687}
|
||||
m_EffectDistance: {x: 2, y: -2}
|
||||
m_UseGraphicAlpha: 1
|
||||
--- !u!1 &2355055011698226078
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2355055011698226079}
|
||||
- component: {fileID: 2355055011698226145}
|
||||
- component: {fileID: 2355055011698226144}
|
||||
- component: {fileID: 2355055011698226147}
|
||||
- component: {fileID: 2355055011698226146}
|
||||
- component: {fileID: -2069562318219531213}
|
||||
m_Layer: 0
|
||||
m_Name: TipTool
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2355055011698226079
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
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:
|
||||
- {fileID: 2355055011407297046}
|
||||
m_Father: {fileID: 0}
|
||||
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}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 761.373, y: 78.4696}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2355055011698226145
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2355055011698226144
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 942794fe63ceddb408bd75d598c4e5a0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!225 &2355055011698226147
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 1
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!114 &2355055011698226146
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dd41c1f5deece994daa0c510fc7c5e27, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
txtInfo: {fileID: 2355055011407297047}
|
||||
moveSpeed: 400
|
||||
hideSpeed: 3
|
||||
rec: {fileID: 2355055011698226079}
|
||||
can: {fileID: 2355055011698226147}
|
||||
--- !u!114 &-2069562318219531213
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3678c4bb02be8674cb275427847ca801, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
maxNum: 40
|
7
Assets/Resources/Object/TipTool.prefab.meta
Normal file
7
Assets/Resources/Object/TipTool.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2309d86d6a1e4ab46b8ad2813bd7a62d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
127
Assets/Resources/Object/TxtEntry.prefab
Normal file
127
Assets/Resources/Object/TxtEntry.prefab
Normal file
@ -0,0 +1,127 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6041506937056963377
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3475276476669383820}
|
||||
- component: {fileID: 4672929162443022067}
|
||||
- component: {fileID: 1755109133684161900}
|
||||
- component: {fileID: 1516861279282061045}
|
||||
- component: {fileID: 6935337132290820476}
|
||||
- component: {fileID: 4095376081285184502}
|
||||
m_Layer: 0
|
||||
m_Name: TxtEntry
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3475276476669383820
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
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: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &4672929162443022067
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1755109133684161900
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.21176472, g: 0.13333334, b: 0.06666667, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: d33a6853c6fa1394e84d986a286b6f79, type: 3}
|
||||
m_FontSize: 40
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 4
|
||||
m_MaxSize: 60
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u653B\u51FB\u529B+2000"
|
||||
--- !u!114 &1516861279282061045
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 2
|
||||
--- !u!114 &6935337132290820476
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0.21176471, g: 0.13333334, b: 0.06666667, a: 0.5}
|
||||
m_EffectDistance: {x: 0.5, y: -0.5}
|
||||
m_UseGraphicAlpha: 1
|
||||
--- !u!114 &4095376081285184502
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6041506937056963377}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9863575afaa4a9b40b8ed94a5b2e2366, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
txtEntry: {fileID: 1755109133684161900}
|
7
Assets/Resources/Object/TxtEntry.prefab.meta
Normal file
7
Assets/Resources/Object/TxtEntry.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da07407d03f80e44581c2066378ca42e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
220
Assets/Resources/Object/UserTipTool.prefab
Normal file
220
Assets/Resources/Object/UserTipTool.prefab
Normal file
@ -0,0 +1,220 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2355055011407297045
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2355055011407297046}
|
||||
- component: {fileID: 2355055011407297048}
|
||||
- component: {fileID: 2355055011407297047}
|
||||
- component: {fileID: 2137797734135629945}
|
||||
m_Layer: 0
|
||||
m_Name: txtInfo
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2355055011407297046
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011407297045}
|
||||
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: 2355055011698226079}
|
||||
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.0008544922, y: -0.0011901855}
|
||||
m_SizeDelta: {x: 0.73999023, y: 0.58999634}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2355055011407297048
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011407297045}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2355055011407297047
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011407297045}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.8039216, g: 0.85490197, b: 0.8117647, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: d33a6853c6fa1394e84d986a286b6f79, type: 3}
|
||||
m_FontSize: 50
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 5
|
||||
m_MaxSize: 50
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u63D0\u5347\u5730\u56FE\u6309\u94AE\u88AB\u70B9\u51FB\u4E86"
|
||||
--- !u!114 &2137797734135629945
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011407297045}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0.21176471, g: 0.13333334, b: 0.06666667, a: 0.39215687}
|
||||
m_EffectDistance: {x: 2, y: -2}
|
||||
m_UseGraphicAlpha: 1
|
||||
--- !u!1 &2355055011698226078
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2355055011698226079}
|
||||
- component: {fileID: 2355055011698226145}
|
||||
- component: {fileID: 2355055011698226144}
|
||||
- component: {fileID: 2355055011698226147}
|
||||
- component: {fileID: -2069562318219531213}
|
||||
- component: {fileID: 450596007410393962}
|
||||
m_Layer: 0
|
||||
m_Name: UserTipTool
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2355055011698226079
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
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:
|
||||
- {fileID: 2355055011407297046}
|
||||
m_Father: {fileID: 0}
|
||||
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}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 761.373, y: 78.4696}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2355055011698226145
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2355055011698226144
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 942794fe63ceddb408bd75d598c4e5a0, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!225 &2355055011698226147
|
||||
CanvasGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 1
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
--- !u!114 &-2069562318219531213
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3678c4bb02be8674cb275427847ca801, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
maxNum: 40
|
||||
--- !u!114 &450596007410393962
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2355055011698226078}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e2e3bf7de18d86f40b9f993cc384c6c2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
txtInfo: {fileID: 2355055011407297047}
|
||||
moveSpeed: 400
|
||||
hideSpeed: 3
|
||||
rec: {fileID: 2355055011698226079}
|
||||
can: {fileID: 2355055011698226147}
|
7
Assets/Resources/Object/UserTipTool.prefab.meta
Normal file
7
Assets/Resources/Object/UserTipTool.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b2fc997114c72e478f07f5fc2832262
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -106,6 +106,8 @@ MonoBehaviour:
|
||||
monsterObj: {fileID: 5329658449239718011}
|
||||
damageUser: {fileID: 1141239977402925288}
|
||||
damageMonster: {fileID: 412705742210104624}
|
||||
target1: {fileID: 753951653242507938}
|
||||
target2: {fileID: 104164078426145410}
|
||||
--- !u!1 &188774682919705134
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -672,7 +674,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, 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: 560}
|
||||
m_AnchoredPosition: {x: 0, y: 520}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &2701068911214513191
|
||||
@ -1570,6 +1572,7 @@ MonoBehaviour:
|
||||
imgDragHp: {fileID: 4290714177918642525}
|
||||
txtDragHp: {fileID: 3441439481994435543}
|
||||
txtDragName: {fileID: 5818511877018894853}
|
||||
imgDrog: {fileID: 7378911029835946288}
|
||||
isDead: 0
|
||||
--- !u!1 &5437851964659198937
|
||||
GameObject:
|
||||
|
@ -1,77 +1,5 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &122213889022202244
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3796709894046778317}
|
||||
m_Layer: 5
|
||||
m_Name: target2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3796709894046778317
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 122213889022202244}
|
||||
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: 3675953734177015779}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 310}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1503096027590982394
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 151139458737276262}
|
||||
m_Layer: 5
|
||||
m_Name: target1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &151139458737276262
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1503096027590982394}
|
||||
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: 3675953734177015779}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -650}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &2772258305661577220
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -188,7 +116,6 @@ GameObject:
|
||||
- component: {fileID: 304962450861463161}
|
||||
- component: {fileID: 3394381824165823032}
|
||||
- component: {fileID: 3646579261039400304}
|
||||
- component: {fileID: 250373273785861600}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
@ -283,20 +210,6 @@ MonoBehaviour:
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &250373273785861600
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5808701799058820954}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c766136bc8b52cf4a8ada19ec85235a4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
target1: {fileID: 151139458737276262}
|
||||
target2: {fileID: 3796709894046778317}
|
||||
--- !u!1 &6174886071419498382
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -360,9 +273,7 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 151139458737276262}
|
||||
- {fileID: 3796709894046778317}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 131438068940824747}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -1025,7 +1025,6 @@ GameObject:
|
||||
- component: {fileID: 4741767872629738886}
|
||||
- component: {fileID: 8366880539326583033}
|
||||
- component: {fileID: 7523367640170231604}
|
||||
- component: {fileID: 7131692688014180614}
|
||||
- component: {fileID: 472856899870823336}
|
||||
- component: {fileID: 6287409372482203101}
|
||||
m_Layer: 5
|
||||
@ -1095,22 +1094,6 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &7131692688014180614
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6084069052734977729}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c766136bc8b52cf4a8ada19ec85235a4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
target1: {fileID: 0}
|
||||
target2: {fileID: 0}
|
||||
damagePos1: {fileID: 0}
|
||||
damagePos2: {fileID: 0}
|
||||
--- !u!114 &472856899870823336
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
3803
Assets/Resources/UI/QiudaoPanel.prefab
Normal file
3803
Assets/Resources/UI/QiudaoPanel.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Resources/UI/QiudaoPanel.prefab.meta
Normal file
7
Assets/Resources/UI/QiudaoPanel.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2cbd247ad36267c49a2b62f4d5188059
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
2254
Assets/Resources/UI/RegisterPanel.prefab
Normal file
2254
Assets/Resources/UI/RegisterPanel.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Resources/UI/RegisterPanel.prefab.meta
Normal file
7
Assets/Resources/UI/RegisterPanel.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6533abe6f6017b4c9208983c0a8bd87
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
583
Assets/Resources/UI/TipPanel.prefab
Normal file
583
Assets/Resources/UI/TipPanel.prefab
Normal file
@ -0,0 +1,583 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1693875339417012251
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1693875339417012250}
|
||||
- component: {fileID: 1693875339417012231}
|
||||
- component: {fileID: 1693875339417012228}
|
||||
- component: {fileID: 1693875339417012229}
|
||||
m_Layer: 5
|
||||
m_Name: txtTip
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1693875339417012250
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1693875339417012251}
|
||||
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: 6036775038694436172}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: -0.000011444, y: -341}
|
||||
m_SizeDelta: {x: 566.7321, y: 209.5571}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1693875339417012231
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1693875339417012251}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1693875339417012228
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1693875339417012251}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.15294118, g: 0.38039216, b: 0.36078432, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: d33a6853c6fa1394e84d986a286b6f79, type: 3}
|
||||
m_FontSize: 60
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 120
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u8D26\u53F7\u548C\u5BC6\u7801\u90FD\u5FC5\u987B\u5927\u4E8E6\u4F4D\u4E14\u89D2\u8272\u540D\u5FC5\u987B\u5927\u4E8E1\u4F4D"
|
||||
--- !u!114 &1693875339417012229
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1693875339417012251}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0.15294118, g: 0.38039216, b: 0.36078432, a: 0.5}
|
||||
m_EffectDistance: {x: 1, y: -1}
|
||||
m_UseGraphicAlpha: 1
|
||||
--- !u!1 &5147170762129617199
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5147170762129617184}
|
||||
- component: {fileID: 5147170762129617187}
|
||||
- component: {fileID: 5147170762129617186}
|
||||
- component: {fileID: 5147170762129617185}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5147170762129617184
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5147170762129617199}
|
||||
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: 5147170762422720512}
|
||||
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!222 &5147170762129617187
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5147170762129617199}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5147170762129617186
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5147170762129617199}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.2627451, g: 0.34509805, b: 0.33333334, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: d33a6853c6fa1394e84d986a286b6f79, type: 3}
|
||||
m_FontSize: 60
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 6
|
||||
m_MaxSize: 80
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u786E\u5B9A"
|
||||
--- !u!114 &5147170762129617185
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5147170762129617199}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0.2627451, g: 0.34509805, b: 0.33333334, a: 0.5}
|
||||
m_EffectDistance: {x: 1, y: -1}
|
||||
m_UseGraphicAlpha: 1
|
||||
--- !u!1 &5147170762422720527
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5147170762422720512}
|
||||
- component: {fileID: 5147170762422720515}
|
||||
- component: {fileID: 5147170762422720514}
|
||||
- component: {fileID: 5147170762422720513}
|
||||
m_Layer: 5
|
||||
m_Name: btnSure
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5147170762422720512
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5147170762422720527}
|
||||
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:
|
||||
- {fileID: 5147170762129617184}
|
||||
m_Father: {fileID: 6036775038694436172}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 373.07, y: -552}
|
||||
m_SizeDelta: {x: 272.5298, y: 89.161}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5147170762422720515
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5147170762422720527}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5147170762422720514
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5147170762422720527}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: ebdbe35adb4ea2b49b24d36196ab660b, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &5147170762422720513
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5147170762422720527}
|
||||
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: 5147170762422720514}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &5365719992291605954
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6036775038694436172}
|
||||
- component: {fileID: 4143675615267886978}
|
||||
- component: {fileID: 7219900129686942770}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6036775038694436172
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5365719992291605954}
|
||||
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:
|
||||
- {fileID: 5147170762422720512}
|
||||
- {fileID: 3780357905823576023}
|
||||
- {fileID: 1693875339417012250}
|
||||
m_Father: {fileID: 8157103318059613214}
|
||||
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}
|
||||
m_AnchoredPosition: {x: 0.000026703, y: 71}
|
||||
m_SizeDelta: {x: 746.1459, y: 654.2483}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4143675615267886978
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5365719992291605954}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7219900129686942770
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5365719992291605954}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 3281012105a5db041bbd7701567bbc64, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &8157103318059613213
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8157103318059613214}
|
||||
- component: {fileID: 2139183789916868281}
|
||||
- component: {fileID: 5307968736045426983}
|
||||
- component: {fileID: 6949268762893243520}
|
||||
m_Layer: 5
|
||||
m_Name: TipPanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8157103318059613214
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8157103318059613213}
|
||||
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:
|
||||
- {fileID: 6036775038694436172}
|
||||
m_Father: {fileID: 0}
|
||||
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!222 &2139183789916868281
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8157103318059613213}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5307968736045426983
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8157103318059613213}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &6949268762893243520
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8157103318059613213}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d370d1a18db99664e8e5bdfe31d3fcf2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
btnSure: {fileID: 5147170762422720513}
|
||||
txtTip: {fileID: 1693875339417012228}
|
||||
--- !u!1 &9138642042687051780
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3780357905823576023}
|
||||
- component: {fileID: 3374148500322651889}
|
||||
- component: {fileID: 3324703701873176090}
|
||||
- component: {fileID: 3780357905823575080}
|
||||
m_Layer: 5
|
||||
m_Name: Text (Legacy)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3780357905823576023
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9138642042687051780}
|
||||
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: 6036775038694436172}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -108}
|
||||
m_SizeDelta: {x: 348.5118, y: 154.60962}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3374148500322651889
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9138642042687051780}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3324703701873176090
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9138642042687051780}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.15294118, g: 0.38039216, b: 0.36078432, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: d33a6853c6fa1394e84d986a286b6f79, type: 3}
|
||||
m_FontSize: 80
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 120
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u63D0\u793A"
|
||||
--- !u!114 &3780357905823575080
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9138642042687051780}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0.15294118, g: 0.38039216, b: 0.36078432, a: 0.5}
|
||||
m_EffectDistance: {x: 1, y: -1}
|
||||
m_UseGraphicAlpha: 1
|
7
Assets/Resources/UI/TipPanel.prefab.meta
Normal file
7
Assets/Resources/UI/TipPanel.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da1e29de6a7af334eabdae5c01106a5e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,5 +1,41 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &103604887866138642
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1861673741291264119}
|
||||
m_Layer: 5
|
||||
m_Name: tipPanelPos
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1861673741291264119
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 103604887866138642}
|
||||
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: 194822492476446274}
|
||||
m_RootOrder: 11
|
||||
m_LocalEulerAnglesHint: {x: 0, 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: -115}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &194822491172094261
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -11,9 +47,8 @@ GameObject:
|
||||
- component: {fileID: 194822491172094260}
|
||||
- component: {fileID: 194822491172094249}
|
||||
- component: {fileID: 194822491172094262}
|
||||
- component: {fileID: 194822491172094263}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_Name: imgGasLen
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -32,13 +67,13 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 194822492476446274}
|
||||
m_RootOrder: 1
|
||||
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}
|
||||
m_AnchoredPosition: {x: 0, y: -479.52002}
|
||||
m_SizeDelta: {x: 618.079, y: 61.264}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 230.00003, y: -479.52002}
|
||||
m_SizeDelta: {x: 443.5174, y: 61.264}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &194822491172094249
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -68,7 +103,7 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 4996c4aab7edf9348a81830e56c007e2, type: 3}
|
||||
m_Type: 0
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
@ -77,21 +112,6 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &194822491172094263
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 194822491172094261}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_EffectDistance: {x: 1, y: -1}
|
||||
m_UseGraphicAlpha: 1
|
||||
--- !u!1 &194822491224466691
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -106,7 +126,7 @@ GameObject:
|
||||
- component: {fileID: 194822491224466693}
|
||||
- component: {fileID: 5047985465295190815}
|
||||
m_Layer: 5
|
||||
m_Name: txtYu
|
||||
m_Name: txtMinuteGas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -129,7 +149,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 117, y: -228}
|
||||
m_AnchoredPosition: {x: 117, y: -128}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &194822491224466695
|
||||
@ -173,7 +193,7 @@ MonoBehaviour:
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u4ED9\u7389\u52A0\u6210\uFF1A0"
|
||||
m_Text: "\u6BCF\u5206\u949F\u7075\u6C14\uFF1A0"
|
||||
--- !u!114 &194822491224466693
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -347,7 +367,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 194822491802271781}
|
||||
m_Father: {fileID: 194822492476446274}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@ -898,7 +918,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 194822491398406066}
|
||||
m_Father: {fileID: 194822492476446274}
|
||||
m_RootOrder: 4
|
||||
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}
|
||||
@ -1020,7 +1040,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 194822491630284090}
|
||||
m_Father: {fileID: 194822492476446274}
|
||||
m_RootOrder: 3
|
||||
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}
|
||||
@ -1522,6 +1542,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 194822492602126721}
|
||||
- {fileID: 8789977523150611325}
|
||||
- {fileID: 194822491172094260}
|
||||
- {fileID: 194822492765395984}
|
||||
- {fileID: 194822491624695901}
|
||||
@ -1530,6 +1551,8 @@ RectTransform:
|
||||
- {fileID: 194822493231740196}
|
||||
- {fileID: 194822493081996514}
|
||||
- {fileID: 194822493016751607}
|
||||
- {fileID: 1769750092923349655}
|
||||
- {fileID: 1861673741291264119}
|
||||
m_Father: {fileID: 3551146463768186821}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -1751,7 +1774,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1290134643634156403}
|
||||
m_RootOrder: 7
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
@ -1862,7 +1885,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 194822492670002325}
|
||||
m_Father: {fileID: 194822492476446274}
|
||||
m_RootOrder: 2
|
||||
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}
|
||||
@ -1984,11 +2007,11 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1290134643634156403}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 117, y: -128}
|
||||
m_AnchoredPosition: {x: 117, y: -228}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &194822493015005608
|
||||
@ -2032,7 +2055,7 @@ MonoBehaviour:
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u6297\u7206\u7387\uFF1A0%"
|
||||
m_Text: "\u6297\u7206\u7387\uFF1A0"
|
||||
--- !u!114 &194822493015005622
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2095,7 +2118,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 194822492476446274}
|
||||
m_RootOrder: 8
|
||||
m_RootOrder: 9
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@ -2206,7 +2229,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 194822492476446274}
|
||||
m_RootOrder: 7
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@ -2539,7 +2562,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 194822491722850703}
|
||||
m_Father: {fileID: 194822492476446274}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@ -2719,6 +2742,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: acb2b96706f720b48ba4b4446886cbb2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
imgGasLen: {fileID: 194822491172094260}
|
||||
btnEquip: {fileID: 194822492765395987}
|
||||
btnJian: {fileID: 194822491624695900}
|
||||
btnLian: {fileID: 194822491609294258}
|
||||
@ -2726,12 +2750,14 @@ MonoBehaviour:
|
||||
btnTop: {fileID: 194822493231740199}
|
||||
txtRealm: {fileID: 194822493081996519}
|
||||
outLine: {fileID: 194822493081996517}
|
||||
gasTipPos: {fileID: 1769750092923349655}
|
||||
tipPanelPos: {fileID: 1861673741291264119}
|
||||
txtGas: {fileID: 194822493016751592}
|
||||
txtHp: {fileID: 194822493141304054}
|
||||
txtAtk: {fileID: 194822493212616852}
|
||||
txtDef: {fileID: 194822492000186788}
|
||||
txtCrit: {fileID: 194822491226036814}
|
||||
txtYu: {fileID: 194822491224466692}
|
||||
txtMinuteGas: {fileID: 194822491224466692}
|
||||
txtKangCrit: {fileID: 194822493015005609}
|
||||
txtAtkSpeed: {fileID: 194822492760081434}
|
||||
txtCritDamage: {fileID: 194822491342610050}
|
||||
@ -2773,8 +2799,8 @@ RectTransform:
|
||||
- {fileID: 194822492000186786}
|
||||
- {fileID: 194822491226036812}
|
||||
- {fileID: 194822491224466690}
|
||||
- {fileID: 194822493015005623}
|
||||
- {fileID: 194822492760081432}
|
||||
- {fileID: 194822493015005623}
|
||||
- {fileID: 194822491342610048}
|
||||
- {fileID: 194822491289249205}
|
||||
- {fileID: 194822491534617040}
|
||||
@ -2824,6 +2850,134 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &4510947303652925644
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1769750092923349655}
|
||||
m_Layer: 5
|
||||
m_Name: gasTipPos
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1769750092923349655
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4510947303652925644}
|
||||
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: 194822492476446274}
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, 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: -279}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &5495779181019805305
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8789977523150611325}
|
||||
- component: {fileID: 22751775240369427}
|
||||
- component: {fileID: 7097194093590794197}
|
||||
- component: {fileID: 1018824090716438420}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8789977523150611325
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5495779181019805305}
|
||||
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: 194822492476446274}
|
||||
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}
|
||||
m_AnchoredPosition: {x: 230.00003, y: -479.52002}
|
||||
m_SizeDelta: {x: 620, y: 61.264}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &22751775240369427
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5495779181019805305}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7097194093590794197
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5495779181019805305}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.49056602, g: 0.49056602, b: 0.49056602, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 4996c4aab7edf9348a81830e56c007e2, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &1018824090716438420
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5495779181019805305}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_EffectDistance: {x: 1, y: -1}
|
||||
m_UseGraphicAlpha: 1
|
||||
--- !u!1 &8121098470644817763
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
8
Assets/Scripts/BeginScene.meta
Normal file
8
Assets/Scripts/BeginScene.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33c705cfeb01e6749ab3f3b140d22eb4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/BeginScene/Data.meta
Normal file
8
Assets/Scripts/BeginScene/Data.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00333064fc7815a449f77fac6864d481
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11
Assets/Scripts/BeginScene/Data/RegisterData.cs
Normal file
11
Assets/Scripts/BeginScene/Data/RegisterData.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 注册数据
|
||||
/// </summary>
|
||||
public class RegisterData
|
||||
{
|
||||
public Dictionary<string, string> registerInfo = new Dictionary<string, string>();
|
||||
}
|
11
Assets/Scripts/BeginScene/Data/RegisterData.cs.meta
Normal file
11
Assets/Scripts/BeginScene/Data/RegisterData.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46a29fdad0e660f4aa78df2ccc7ae0df
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/BeginScene/UI.meta
Normal file
8
Assets/Scripts/BeginScene/UI.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 401df32176b1538478e862458aee5d9e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
184
Assets/Scripts/BeginScene/UI/LoginPanel.cs
Normal file
184
Assets/Scripts/BeginScene/UI/LoginPanel.cs
Normal file
@ -0,0 +1,184 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LoginPanel : BasePanel
|
||||
{
|
||||
//注册按钮
|
||||
public Button btnRegister;
|
||||
//登录按钮
|
||||
public Button btnLogin;
|
||||
|
||||
//账号输入框
|
||||
public InputField inputUser;
|
||||
public Text txtPlaUser;
|
||||
//密码输入框
|
||||
public InputField inputPw;
|
||||
public Text txtPlaPw;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
Debug.Log(Application.persistentDataPath);
|
||||
GameDataMgr.Instance.Init();
|
||||
|
||||
btnRegister.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.ShowPanel<RegisterPanel>(E_UILayer.Bottom);
|
||||
UIManager.Instance.HidePanel<LoginPanel>();
|
||||
});
|
||||
|
||||
btnLogin.onClick.AddListener(() =>
|
||||
{
|
||||
//点击登录后 要验证用户密码 是否正确
|
||||
//判断是否合法
|
||||
if (inputPw.text.Length <= 6 || inputUser.text.Length <= 6)
|
||||
{
|
||||
//提示不合法
|
||||
TipPanel panel = UIManager.Instance.ShowPanel<TipPanel>(E_UILayer.Bottom);
|
||||
//改变提示面板上提示的内容
|
||||
panel.ChangeInfo("账号和密码都必须大于6位");
|
||||
return;
|
||||
}
|
||||
|
||||
//验证 用户名和密码 是否 通过
|
||||
if (GameDataMgr.Instance.CheckInfo(inputUser.text, inputPw.text))
|
||||
{
|
||||
//读取玩家数据
|
||||
GameDataMgr.Instance.PlayerDataLoad(inputUser.text);
|
||||
//登录成功
|
||||
UIManager.Instance.ShowPanel<TopPanel>(E_UILayer.System);
|
||||
UIManager.Instance.ShowPanel<BattlePanel>(E_UILayer.Bottom);
|
||||
UIManager.Instance.ShowPanel<LowerPanel>(E_UILayer.System);
|
||||
//隐藏自己
|
||||
UIManager.Instance.HidePanel<LoginPanel>();
|
||||
}
|
||||
else
|
||||
{
|
||||
//登录失败
|
||||
UIManager.Instance.ShowPanel<TipPanel>(E_UILayer.Middle).ChangeInfo("账号或密码错误");
|
||||
}
|
||||
});
|
||||
|
||||
//账号输入规范,只能输入大小写字母和数字
|
||||
inputUser.onValueChanged.AddListener((value) =>
|
||||
{
|
||||
// 使用正则表达式,只保留大小写字母和数字
|
||||
string userStr = Regex.Replace(value, @"[^a-zA-Z0-9]", "");
|
||||
// 限制最多输入 16 个字符
|
||||
if (userStr.Length > 16)
|
||||
{
|
||||
userStr = userStr.Substring(0, 16);
|
||||
}
|
||||
// 更新输入框内容
|
||||
if (value != userStr)
|
||||
{
|
||||
inputUser.text = userStr;
|
||||
}
|
||||
});
|
||||
//密码输入规范,只能输入大小写字母和数字
|
||||
inputPw.onValueChanged.AddListener((value) =>
|
||||
{
|
||||
// 使用正则表达式,只保留大小写字母和数字
|
||||
string pwStr = Regex.Replace(value, @"[^a-zA-Z0-9]", "");
|
||||
// 限制最多输入 16 个字符
|
||||
if (pwStr.Length > 16)
|
||||
{
|
||||
pwStr = pwStr.Substring(0, 16);
|
||||
}
|
||||
// 更新输入框内容
|
||||
if (value != pwStr)
|
||||
{
|
||||
inputPw.text = pwStr;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// 检测 Tab 键按下
|
||||
if (Input.GetKeyDown(KeyCode.Tab))
|
||||
{
|
||||
// 获取当前选中的对象
|
||||
GameObject currentSelected = EventSystem.current.currentSelectedGameObject;
|
||||
|
||||
// 判断当前对象是哪个输入框,并跳转到另一个输入框
|
||||
if (currentSelected == inputUser.gameObject)
|
||||
{
|
||||
inputPw.Select();
|
||||
if (inputUser.text== "")
|
||||
{
|
||||
txtPlaUser.text = "请输入账号";
|
||||
}
|
||||
if (inputPw.text== "")
|
||||
{
|
||||
txtPlaPw.text = "";
|
||||
}
|
||||
}
|
||||
else if (currentSelected == inputPw.gameObject)
|
||||
{
|
||||
inputUser.Select();
|
||||
if (inputPw.text == "")
|
||||
{
|
||||
txtPlaPw.text = "请输入密码";
|
||||
}
|
||||
if (inputUser.text == "")
|
||||
{
|
||||
txtPlaUser.text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 当鼠标点击输入框时
|
||||
if (EventSystem.current.currentSelectedGameObject == inputUser.gameObject)
|
||||
{
|
||||
// 清空Placeholder
|
||||
txtPlaUser.text = "";
|
||||
if (inputPw.text == "")
|
||||
{
|
||||
txtPlaPw.text = "请输入密码";
|
||||
}
|
||||
}
|
||||
|
||||
if (EventSystem.current.currentSelectedGameObject == inputPw.gameObject)
|
||||
{
|
||||
// 清空Placeholder
|
||||
txtPlaPw.text = "";
|
||||
if (inputUser.text == "")
|
||||
{
|
||||
txtPlaUser.text = "请输入账号";
|
||||
}
|
||||
}
|
||||
|
||||
// 检测鼠标点击
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
// 如果没有选中的对象,清空所有Placeholder
|
||||
if (EventSystem.current.currentSelectedGameObject == null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(inputUser.text))
|
||||
{
|
||||
txtPlaUser.text = "请输入账号";
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(inputPw.text))
|
||||
{
|
||||
txtPlaPw.text = "请输入密码";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册成功后调用
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="passward"></param>
|
||||
public void SetInfo(string user, string passward)
|
||||
{
|
||||
inputUser.text = user;
|
||||
inputPw.text = passward;
|
||||
}
|
||||
}
|
11
Assets/Scripts/BeginScene/UI/LoginPanel.cs.meta
Normal file
11
Assets/Scripts/BeginScene/UI/LoginPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71cdceffe4f4a194da020df24538d3b6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
239
Assets/Scripts/BeginScene/UI/RegisterPanel.cs
Normal file
239
Assets/Scripts/BeginScene/UI/RegisterPanel.cs
Normal file
@ -0,0 +1,239 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RegisterPanel : BasePanel
|
||||
{
|
||||
public Button btnSure;
|
||||
public Button btnCancel;
|
||||
|
||||
public InputField inputUser;
|
||||
public Text txtPlaUser;
|
||||
|
||||
public InputField inputPw;
|
||||
public Text txtPlaPw;
|
||||
|
||||
public InputField inputGameName;
|
||||
public Text txtPlaName;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
btnCancel.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.HidePanel<RegisterPanel>();
|
||||
UIManager.Instance.ShowPanel<LoginPanel>(E_UILayer.Middle);
|
||||
});
|
||||
btnSure.onClick.AddListener(() =>
|
||||
{
|
||||
//判断输入的账号密码 是否合理
|
||||
if (inputPw.text.Length <= 6 || inputUser.text.Length <= 6||inputGameName.text.Length<=1)
|
||||
{
|
||||
//提示不合法
|
||||
TipPanel panel = UIManager.Instance.ShowPanel<TipPanel>(E_UILayer.Middle);
|
||||
//改变提示面板上提示的内容
|
||||
panel.ChangeInfo("账号和密码都必须大于6位且角色名必须大于1位");
|
||||
return;
|
||||
}
|
||||
|
||||
//去注册账号密码
|
||||
if (GameDataMgr.Instance.RegisterUser(inputUser.text, inputPw.text, inputGameName.text)==3)
|
||||
{
|
||||
//注册成功
|
||||
//显示 登录面板
|
||||
LoginPanel loginPanel = UIManager.Instance.ShowPanel<LoginPanel>(E_UILayer.Middle);
|
||||
//跟新登录面板上的 用户名和密码
|
||||
loginPanel.SetInfo(inputUser.text, inputPw.text);
|
||||
//隐藏自己
|
||||
UIManager.Instance.HidePanel<RegisterPanel>();
|
||||
}
|
||||
else if (GameDataMgr.Instance.RegisterUser(inputUser.text, inputPw.text, inputGameName.text) == 2)
|
||||
{
|
||||
//提示别人 用户名已经存在
|
||||
TipPanel tipPanel = UIManager.Instance.ShowPanel<TipPanel>(E_UILayer.Middle);
|
||||
//改变提示内容
|
||||
tipPanel.ChangeInfo("角色名已存在,请重新输入角色名");
|
||||
//角色名变为空,方便重新输入
|
||||
inputGameName.text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
//提示别人 用户名已经存在
|
||||
TipPanel tipPanel = UIManager.Instance.ShowPanel<TipPanel>(E_UILayer.Middle);
|
||||
//改变提示内容
|
||||
tipPanel.ChangeInfo("账户已存在");
|
||||
//方便别人重新输入
|
||||
inputUser.text = "";
|
||||
inputPw.text = "";
|
||||
}
|
||||
});
|
||||
|
||||
//账号输入规范,只能输入大小写字母和数字
|
||||
inputUser.onValueChanged.AddListener((value) =>
|
||||
{
|
||||
// 使用正则表达式,只保留大小写字母和数字
|
||||
string userStr = Regex.Replace(value, @"[^a-zA-Z0-9]", "");
|
||||
// 限制最多输入 16 个字符
|
||||
if (userStr.Length > 16)
|
||||
{
|
||||
userStr = userStr.Substring(0, 16);
|
||||
}
|
||||
// 更新输入框内容
|
||||
if (value != userStr)
|
||||
{
|
||||
inputUser.text = userStr;
|
||||
}
|
||||
});
|
||||
//密码输入规范,只能输入大小写字母和数字
|
||||
inputPw.onValueChanged.AddListener((value) =>
|
||||
{
|
||||
// 使用正则表达式,只保留大小写字母和数字
|
||||
string pwStr = Regex.Replace(value, @"[^a-zA-Z0-9]", "");
|
||||
// 限制最多输入 16 个字符
|
||||
if (pwStr.Length > 16)
|
||||
{
|
||||
pwStr = pwStr.Substring(0, 16);
|
||||
}
|
||||
// 更新输入框内容
|
||||
if (value != pwStr)
|
||||
{
|
||||
inputPw.text = pwStr;
|
||||
}
|
||||
});
|
||||
//角色名输入规范,只能输入汉字
|
||||
inputGameName.onValueChanged.AddListener((value) =>
|
||||
{
|
||||
// 使用正则表达式,只保留汉字
|
||||
string chineseOnly = Regex.Replace(value, @"[^\u4e00-\u9fa5]", "");
|
||||
// 限制最多输入 6 个汉字
|
||||
if (chineseOnly.Length > 6)
|
||||
{
|
||||
chineseOnly = chineseOnly.Substring(0, 6);
|
||||
}
|
||||
// 如果当前输入框内容有变化,更新内容
|
||||
if (value != chineseOnly)
|
||||
{
|
||||
inputGameName.text = chineseOnly;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// 检测 Tab 键按下
|
||||
if (Input.GetKeyDown(KeyCode.Tab))
|
||||
{
|
||||
// 获取当前选中的对象
|
||||
GameObject currentSelected = EventSystem.current.currentSelectedGameObject;
|
||||
|
||||
// 判断当前对象是哪个输入框,并跳转到另一个输入框
|
||||
if (currentSelected == inputUser.gameObject)
|
||||
{
|
||||
inputPw.Select();
|
||||
if (inputUser.text == "")
|
||||
{
|
||||
txtPlaUser.text = "请输入账号";
|
||||
}
|
||||
if (inputPw.text == "")
|
||||
{
|
||||
txtPlaPw.text = "";
|
||||
}
|
||||
}
|
||||
else if (currentSelected == inputPw.gameObject)
|
||||
{
|
||||
inputGameName.Select();
|
||||
if (inputPw.text == "")
|
||||
{
|
||||
txtPlaPw.text = "请输入密码";
|
||||
}
|
||||
if (inputGameName.text == "")
|
||||
{
|
||||
txtPlaUser.text = "";
|
||||
}
|
||||
}
|
||||
else if (currentSelected == inputGameName.gameObject)
|
||||
{
|
||||
inputUser.Select();
|
||||
if (inputGameName.text == "")
|
||||
{
|
||||
txtPlaName.text = "请输入角色名(六个汉字)";
|
||||
}
|
||||
if (inputUser.text == "")
|
||||
{
|
||||
txtPlaUser.text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 当鼠标点击输入框时
|
||||
if (EventSystem.current.currentSelectedGameObject == inputUser.gameObject)
|
||||
{
|
||||
// 清空Placeholder
|
||||
txtPlaUser.text = "";
|
||||
if (inputPw.text == "")
|
||||
{
|
||||
txtPlaPw.text = "请输入密码";
|
||||
}
|
||||
|
||||
if (inputGameName.text=="")
|
||||
{
|
||||
txtPlaName.text = "请输入角色名(六个汉字)";
|
||||
}
|
||||
}
|
||||
|
||||
if (EventSystem.current.currentSelectedGameObject == inputPw.gameObject)
|
||||
{
|
||||
// 清空Placeholder
|
||||
txtPlaPw.text = "";
|
||||
if (inputUser.text == "")
|
||||
{
|
||||
txtPlaUser.text = "请输入账号";
|
||||
}
|
||||
|
||||
if (inputGameName.text == "")
|
||||
{
|
||||
txtPlaName.text = "请输入角色名(六个汉字)";
|
||||
}
|
||||
}
|
||||
|
||||
if (EventSystem.current.currentSelectedGameObject == inputGameName.gameObject)
|
||||
{
|
||||
// 清空Placeholder
|
||||
txtPlaName.text = "";
|
||||
if (inputUser.text == "")
|
||||
{
|
||||
txtPlaUser.text = "请输入账号";
|
||||
}
|
||||
|
||||
if (inputPw.text == "")
|
||||
{
|
||||
txtPlaPw.text = "请输入密码";
|
||||
}
|
||||
}
|
||||
|
||||
// 检测鼠标点击
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
// 如果没有选中的对象,清空所有Placeholder
|
||||
if (EventSystem.current.currentSelectedGameObject == null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(inputUser.text))
|
||||
{
|
||||
txtPlaUser.text = "请输入账号";
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(inputPw.text))
|
||||
{
|
||||
txtPlaPw.text = "请输入密码";
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(inputGameName.text))
|
||||
{
|
||||
txtPlaName.text = "请输入角色名(六个汉字)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/BeginScene/UI/RegisterPanel.cs.meta
Normal file
11
Assets/Scripts/BeginScene/UI/RegisterPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b78ceda23e46194b944bb82198a7d60
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
23
Assets/Scripts/BeginScene/UI/TipPanel.cs
Normal file
23
Assets/Scripts/BeginScene/UI/TipPanel.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TipPanel : BasePanel
|
||||
{
|
||||
public Button btnSure;
|
||||
|
||||
public Text txtTip;
|
||||
public override void Init()
|
||||
{
|
||||
btnSure.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.HidePanel<TipPanel>();
|
||||
});
|
||||
}
|
||||
|
||||
public void ChangeInfo(string str)
|
||||
{
|
||||
txtTip.text= str;
|
||||
}
|
||||
}
|
11
Assets/Scripts/BeginScene/UI/TipPanel.cs.meta
Normal file
11
Assets/Scripts/BeginScene/UI/TipPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d370d1a18db99664e8e5bdfe31d3fcf2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -32,11 +32,19 @@ public enum E_EventType
|
||||
/// </summary>
|
||||
E_Player_Wound,
|
||||
/// <summary>
|
||||
/// 对象池注册事件1 —— 参数:string文字
|
||||
/// 弹窗事件1 —— 参数:string文字信息
|
||||
/// </summary>
|
||||
E_Pool_Register1,
|
||||
/// <summary>
|
||||
/// 对象池注册事件2 —— 参数:string文字
|
||||
/// 弹窗事件2 —— 参数:string文字信息
|
||||
/// </summary>
|
||||
E_Pool_Register2
|
||||
E_Pool_Register2,
|
||||
/// <summary>
|
||||
/// 灵气弹窗
|
||||
/// </summary>
|
||||
E_Pool_GasTip,
|
||||
/// <summary>
|
||||
/// 人物界面弹窗信息
|
||||
/// </summary>
|
||||
E_Pool_UserPanelTip,
|
||||
}
|
||||
|
68
Assets/Scripts/GameObject/AddGasNum.cs
Normal file
68
Assets/Scripts/GameObject/AddGasNum.cs
Normal file
@ -0,0 +1,68 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
|
||||
public class AddGasNum : MonoBehaviour
|
||||
{
|
||||
//文字信息
|
||||
public Text txtInfo;
|
||||
//上移速度
|
||||
public float moveSpeed;
|
||||
//向上偏移位置
|
||||
public float moveOffset;
|
||||
//隐藏速度
|
||||
public float hideSpeed;
|
||||
//位置
|
||||
public RectTransform rec;
|
||||
//透明组件
|
||||
public CanvasGroup can;
|
||||
//起始点
|
||||
private Vector2 startPos;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
can.alpha = 1;
|
||||
startPos = rec.localPosition;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (GameMgr.Instance.isUserNumAndGas)
|
||||
{
|
||||
ResetData();
|
||||
return;
|
||||
}
|
||||
startPos.y += Time.deltaTime * moveSpeed;
|
||||
if (startPos.y >= moveOffset)
|
||||
{
|
||||
startPos.y = moveOffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
rec.localPosition = startPos;
|
||||
}
|
||||
|
||||
if (startPos.y >= 100f)
|
||||
{
|
||||
can.alpha -= Time.deltaTime * hideSpeed;
|
||||
if (can.alpha <= 0)
|
||||
{
|
||||
ResetData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateTxtInfo(string str)
|
||||
{
|
||||
txtInfo.text=str;
|
||||
}
|
||||
|
||||
//重置数据并放入对象池内
|
||||
public void ResetData()
|
||||
{
|
||||
can.alpha = 0;
|
||||
rec.position = Vector3.zero;
|
||||
PoolMgr.Instance.PushObj(this.gameObject);
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameObject/AddGasNum.cs.meta
Normal file
11
Assets/Scripts/GameObject/AddGasNum.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 649974ccd78208e4a89608a4c7dcc36d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
29
Assets/Scripts/GameObject/BtnEquip.cs
Normal file
29
Assets/Scripts/GameObject/BtnEquip.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class BtnEquip : MonoBehaviour
|
||||
{
|
||||
public Button btnSelf;
|
||||
public Text txtName;
|
||||
|
||||
//µ±Ç°×°±¸µÄÐÅÏ¢
|
||||
private EquipData nowEquipData;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
btnSelf.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.ShowPanel<EquipInfoPanel>(E_UILayer.System);
|
||||
UIManager.Instance.GetPanel<EquipInfoPanel>().UpdatePanel(nowEquipData);
|
||||
});
|
||||
}
|
||||
|
||||
public void UpdatePanel(EquipData equip)
|
||||
{
|
||||
nowEquipData= equip;
|
||||
txtName.text = equip.name;
|
||||
txtName.color = GameMgr.Instance.HexToColor(equip.color);
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameObject/BtnEquip.cs.meta
Normal file
11
Assets/Scripts/GameObject/BtnEquip.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a72a5afb6cc81a9458a6532179863bc4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
30
Assets/Scripts/GameObject/BtnMaterial.cs
Normal file
30
Assets/Scripts/GameObject/BtnMaterial.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class BtnMaterial : MonoBehaviour
|
||||
{
|
||||
public Button btnSelf;
|
||||
public Text txtName;
|
||||
public Text txtNum;
|
||||
|
||||
private GoodsData nowGoods;
|
||||
|
||||
void Start()
|
||||
{
|
||||
//点击按钮更新背包面板上的文字描述
|
||||
btnSelf.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.GetPanel<BagPanel>().UpdateTxtInfo(nowGoods);
|
||||
});
|
||||
}
|
||||
|
||||
public void UpdatePanel(GoodsData goods)
|
||||
{
|
||||
nowGoods = goods;
|
||||
txtName.text = goods.name;
|
||||
txtNum.text = goods.num.ToString();
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameObject/BtnMaterial.cs.meta
Normal file
11
Assets/Scripts/GameObject/BtnMaterial.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c79899ebd7a06fb4491c5acd76d8818e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -12,6 +12,8 @@ public class MonsterObject : MonoBehaviour
|
||||
public Text txtDragHp;
|
||||
//怪物名字
|
||||
public Text txtDragName;
|
||||
//怪物的图片
|
||||
public Image imgDrog;
|
||||
|
||||
//当前血量
|
||||
private int hp;
|
||||
@ -94,16 +96,14 @@ public class MonsterObject : MonoBehaviour
|
||||
|
||||
//玩家获得奖励
|
||||
//玩家的总灵石 +=(怪物掉落+怪物掉落*玩家灵石加成)
|
||||
int getStone = monster.stone + (int)(monster.stone * GameDataMgr.Instance.player.stoneAdd/100);
|
||||
int getStone = monster.stone + (int)(monster.stone * (GameDataMgr.Instance.player.stoneAdd/100));
|
||||
GameDataMgr.Instance.player.stone += getStone;
|
||||
//玩家的总仙玉 +=(怪物掉落+怪物掉落*玩家仙玉加成)
|
||||
int getYu = monster.yu + (int)(monster.yu * GameDataMgr.Instance.player.yuAdd/100);
|
||||
GameDataMgr.Instance.player.yu += getYu;
|
||||
//玩家的总灵气 +=(怪物掉落+怪物掉落*玩家灵气加成)
|
||||
int getGas = monster.gas + (int)(monster.gas * GameDataMgr.Instance.player.gasAdd / 100);
|
||||
GameDataMgr.Instance.player.gas += getGas;
|
||||
//玩家背包增加源石和其他物品
|
||||
|
||||
|
||||
|
||||
//弹出奖励框 更新TopPanel的面板数据
|
||||
GameMgr.Instance.StartTip(getStone,getYu,getGas);
|
||||
GameMgr.Instance.StartTip(getStone,monster.yuan);
|
||||
//保存玩家数据
|
||||
GameDataMgr.Instance.PlayerDataSave();
|
||||
}
|
||||
@ -132,6 +132,7 @@ public class MonsterObject : MonoBehaviour
|
||||
imgDragHp.sizeDelta = new Vector2(hpWide, imgDragHp.sizeDelta.y);
|
||||
txtDragHp.text = GameMgr.Instance.SetNumber(monster.hp) + "/" + GameMgr.Instance.SetNumber(monster.hp);
|
||||
hp = monster.hp;
|
||||
imgDrog.color = GameMgr.Instance.HexToColor(monster.color);
|
||||
//重置怪物面板时 把攻击时间归0
|
||||
frontTime = Time.time;
|
||||
}
|
||||
|
58
Assets/Scripts/GameObject/TipTool.cs
Normal file
58
Assets/Scripts/GameObject/TipTool.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
|
||||
public class TipTool : MonoBehaviour
|
||||
{
|
||||
//文字信息
|
||||
public Text txtInfo;
|
||||
//上移速度
|
||||
public float moveSpeed;
|
||||
//隐藏速度
|
||||
public float hideSpeed;
|
||||
//位置
|
||||
public RectTransform rec;
|
||||
//透明组件
|
||||
public CanvasGroup can;
|
||||
//记录时间
|
||||
private float addTime;
|
||||
//起始点
|
||||
private Vector2 startPos;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
can.alpha = 1;
|
||||
startPos = rec.localPosition;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
addTime += Time.deltaTime;
|
||||
startPos.y += Time.deltaTime * moveSpeed;
|
||||
if (startPos.y >= 300f)
|
||||
{
|
||||
startPos.y = 300f;
|
||||
}
|
||||
else
|
||||
{
|
||||
rec.localPosition = startPos;
|
||||
}
|
||||
if (addTime >= 1.5f)
|
||||
{
|
||||
can.alpha -=Time.deltaTime * hideSpeed;
|
||||
if (can.alpha<=0)
|
||||
{
|
||||
can.alpha = 0;
|
||||
addTime = 0;
|
||||
rec.position=Vector3.zero;
|
||||
PoolMgr.Instance.PushObj(this.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateTxtInfo(string str)
|
||||
{
|
||||
txtInfo.text=str;
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameObject/TipTool.cs.meta
Normal file
11
Assets/Scripts/GameObject/TipTool.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd41c1f5deece994daa0c510fc7c5e27
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
15
Assets/Scripts/GameObject/TxtEntry.cs
Normal file
15
Assets/Scripts/GameObject/TxtEntry.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TxtEntry : MonoBehaviour
|
||||
{
|
||||
public Text txtEntry;
|
||||
|
||||
|
||||
public void UpdatePanel(string entry)
|
||||
{
|
||||
txtEntry.text = entry;
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameObject/TxtEntry.cs.meta
Normal file
11
Assets/Scripts/GameObject/TxtEntry.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9863575afaa4a9b40b8ed94a5b2e2366
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
69
Assets/Scripts/GameObject/UserTipTool.cs
Normal file
69
Assets/Scripts/GameObject/UserTipTool.cs
Normal file
@ -0,0 +1,69 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
|
||||
public class UserTipTool : MonoBehaviour
|
||||
{
|
||||
//文字信息
|
||||
public Text txtInfo;
|
||||
//上移速度
|
||||
public float moveSpeed;
|
||||
//隐藏速度
|
||||
public float hideSpeed;
|
||||
//位置
|
||||
public RectTransform rec;
|
||||
//透明组件
|
||||
public CanvasGroup can;
|
||||
//记录时间
|
||||
private float addTime;
|
||||
//起始点
|
||||
private Vector2 startPos;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
can.alpha = 1;
|
||||
startPos = rec.localPosition;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (GameMgr.Instance.isUserNumAndGas)
|
||||
{
|
||||
ResetData();
|
||||
return;
|
||||
}
|
||||
addTime += Time.deltaTime;
|
||||
startPos.y += Time.deltaTime * moveSpeed;
|
||||
if (startPos.y >= 300f)
|
||||
{
|
||||
startPos.y = 300f;
|
||||
}
|
||||
else
|
||||
{
|
||||
rec.localPosition = startPos;
|
||||
}
|
||||
if (addTime >= 1.5f)
|
||||
{
|
||||
can.alpha -=Time.deltaTime * hideSpeed;
|
||||
if (can.alpha<=0)
|
||||
{
|
||||
ResetData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateTxtInfo(string str)
|
||||
{
|
||||
txtInfo.text=str;
|
||||
}
|
||||
|
||||
//重置数据并放入对象池内
|
||||
public void ResetData()
|
||||
{
|
||||
can.alpha = 0;
|
||||
addTime = 0;
|
||||
rec.position = Vector3.zero;
|
||||
PoolMgr.Instance.PushObj(this.gameObject);
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameObject/UserTipTool.cs.meta
Normal file
11
Assets/Scripts/GameObject/UserTipTool.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2e3bf7de18d86f40b9f993cc384c6c2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/GameScene.meta
Normal file
8
Assets/Scripts/GameScene.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 755a3e7ea64029c4fa573de99a7524e4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/GameScene/Data.meta
Normal file
8
Assets/Scripts/GameScene/Data.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a0451a2319fc1a4da6b5a69603acc33
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
22
Assets/Scripts/GameScene/Data/EquipData.cs
Normal file
22
Assets/Scripts/GameScene/Data/EquipData.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class EquipData
|
||||
{
|
||||
public string name;
|
||||
public int hp;
|
||||
public int atk;
|
||||
public int def;
|
||||
public float crit;
|
||||
public float critDamage;
|
||||
public float kangCrit;
|
||||
public float atkSpeed;
|
||||
public float gasAdd;
|
||||
public float yuAdd;
|
||||
public float stoneAdd;
|
||||
public int equipType;
|
||||
public int equipQuality;
|
||||
public string colorName;
|
||||
public string color;
|
||||
}
|
11
Assets/Scripts/GameScene/Data/EquipData.cs.meta
Normal file
11
Assets/Scripts/GameScene/Data/EquipData.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c6490a6a077d214a8a79304a11bb4e8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
217
Assets/Scripts/GameScene/Data/GameDataMgr.cs
Normal file
217
Assets/Scripts/GameScene/Data/GameDataMgr.cs
Normal file
@ -0,0 +1,217 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using System.Xml.Serialization;
|
||||
using LitJson;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
public class GameDataMgr:SingletonAutoMono<GameDataMgr>
|
||||
{
|
||||
//静态变量 不要在外面去new
|
||||
private RegisterData registerData;
|
||||
//公共属性 方便外面获取,外面只能获取,不能修改
|
||||
public RegisterData RegisterData => registerData;
|
||||
|
||||
//玩家属性
|
||||
public PlayerData player;
|
||||
//玩家装备信息(已穿戴和拥有的装备信息)
|
||||
public UserEquipInfo userEquip;
|
||||
//玩家物品信息
|
||||
public UserGoodsInfo userGoods;
|
||||
|
||||
//怪物数据,固定属性
|
||||
private List<MonsterData> monster;
|
||||
public List<MonsterData> monsters => monster;
|
||||
|
||||
//玩家升级属性加成,固定属性
|
||||
private List<UserUpgradeData> userUpGrade;
|
||||
public List<UserUpgradeData> userUpGradeInfo => userUpGrade;
|
||||
|
||||
//装备属性加成,固定属性
|
||||
private List<EquipData> equipData;
|
||||
public List<EquipData> equipInfo => equipData;
|
||||
|
||||
//玩家物品
|
||||
private List<GoodsData> goodsData;
|
||||
public List<GoodsData> goods => goodsData;
|
||||
|
||||
//当前怪物时哪一只
|
||||
public MonsterData nowMonster;
|
||||
|
||||
//public void Init()
|
||||
//{
|
||||
// //读取注册数据
|
||||
// registerData = JsonMgr.Instance.LoadData<RegisterData>("RegisterData");
|
||||
// //获取怪物数据
|
||||
// monster = JsonMgr.Instance.LoadData<List<MonsterData>>("MonsterInfo");
|
||||
// //读取玩家升级属性加成
|
||||
// userUpGrade = JsonMgr.Instance.LoadData<List<UserUpgradeData>>("UserUpgradeInfo");
|
||||
// //读取玩家装备属性加成
|
||||
// equipData = JsonMgr.Instance.LoadData<List<EquipData>>("EquipInfo");
|
||||
// //读取物品信息
|
||||
// goodsData = JsonMgr.Instance.LoadData<List<GoodsData>>("GoodsInfo");
|
||||
// nowMonster = monsters[0];
|
||||
//}
|
||||
public void Init()
|
||||
{
|
||||
//读取注册数据
|
||||
registerData = JsonMgr.Instance.LoadData<RegisterData>("RegisterData");
|
||||
//获取怪物数据
|
||||
StartCoroutine(DataInit<List<MonsterData>>("MonsterInfo"));
|
||||
//读取玩家升级属性加成
|
||||
StartCoroutine(DataInit<List<UserUpgradeData>>("UserUpgradeInfo"));
|
||||
//读取玩家装备属性加成
|
||||
StartCoroutine(DataInit<List<EquipData>>( "EquipInfo"));
|
||||
//读取物品信息
|
||||
StartCoroutine(DataInit<List<GoodsData>>("GoodsInfo"));
|
||||
|
||||
}
|
||||
|
||||
private IEnumerator DataInit<T>(string name)
|
||||
{
|
||||
string path = Application.streamingAssetsPath + "/" + name + ".json";
|
||||
|
||||
// 安卓平台需要用UnityWebRequest
|
||||
UnityWebRequest req = UnityWebRequest.Get(path);
|
||||
yield return req.SendWebRequest();
|
||||
|
||||
if (req.result == UnityWebRequest.Result.Success)
|
||||
{
|
||||
string jsonStr = req.downloadHandler.text;
|
||||
T data = JsonMapper.ToObject<T>(jsonStr);
|
||||
Debug.Log("读取成功:" + jsonStr);
|
||||
|
||||
if (data is List<MonsterData>)
|
||||
{
|
||||
monster = data as List<MonsterData>;
|
||||
|
||||
nowMonster = monster[0];
|
||||
}
|
||||
|
||||
if (data is List<UserUpgradeData>)
|
||||
{
|
||||
userUpGrade = data as List<UserUpgradeData>;
|
||||
}
|
||||
|
||||
if (data is List<EquipData>)
|
||||
{
|
||||
equipData = data as List<EquipData>;
|
||||
}
|
||||
|
||||
if (data is List<GoodsData>)
|
||||
{
|
||||
goodsData = data as List<GoodsData>;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("读取失败:" + req.error+path);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取本地玩家数据
|
||||
/// </summary>
|
||||
public void PlayerDataLoad(string txtUser)
|
||||
{
|
||||
player = JsonMgr.Instance.LoadData<PlayerData>(txtUser);
|
||||
|
||||
userEquip = JsonMgr.Instance.LoadData<UserEquipInfo>(txtUser + "equip");
|
||||
|
||||
userGoods = JsonMgr.Instance.LoadData<UserGoodsInfo>(txtUser + "goods");
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存玩家数据到本地
|
||||
/// </summary>
|
||||
/// <param name="txtUser"></param>
|
||||
public void PlayerDataSave()
|
||||
{
|
||||
JsonMgr.Instance.SaveData(player,player.txtUser);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存玩家装备数据到本地
|
||||
/// </summary>
|
||||
/// <param name="txtUser"></param>
|
||||
public void EquipDataSave()
|
||||
{
|
||||
JsonMgr.Instance.SaveData(userEquip, player.txtUser+ "equip");
|
||||
}
|
||||
|
||||
#region 注册
|
||||
|
||||
//存储注册数据
|
||||
public void SavaRegisterData()
|
||||
{
|
||||
JsonMgr.Instance.SaveData(registerData, "RegisterData");
|
||||
}
|
||||
|
||||
//注册方法
|
||||
public int RegisterUser(string userName, string passWord, string gameName)
|
||||
{
|
||||
//判断是否已经存在用户
|
||||
if (registerData.registerInfo.ContainsKey(userName))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//判断角色名是否存在
|
||||
if (registerData.registerInfo.ContainsKey(gameName))
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
//如果不存在 证明可以注册
|
||||
//存储新用户名和密码 存储角色名
|
||||
registerData.registerInfo.Add(userName, passWord);
|
||||
registerData.registerInfo.Add(gameName, passWord);
|
||||
//初始化玩家的数据,保存在本地
|
||||
PlayerData newPlayer = new PlayerData();
|
||||
newPlayer.name = gameName;
|
||||
newPlayer.txtUser = userName;
|
||||
JsonMgr.Instance.SaveData(newPlayer, userName);
|
||||
//初始化玩家的装备信息,保存在本地
|
||||
UserEquipInfo newEquipInfo=new UserEquipInfo();
|
||||
newEquipInfo.itemEquip.Add(equipData[0]);
|
||||
newEquipInfo.itemEquip.Add(equipData[1]);
|
||||
newEquipInfo.itemEquip.Add(equipData[2]);
|
||||
newEquipInfo.itemEquip.Add(equipData[3]);
|
||||
newEquipInfo.itemEquip.Add(equipData[4]);
|
||||
newEquipInfo.itemEquip.Add(equipData[5]);
|
||||
newEquipInfo.itemEquip.Add(equipData[6]);
|
||||
newEquipInfo.itemEquip.Add(equipData[7]);
|
||||
newEquipInfo.itemEquip.Add(equipData[8]);
|
||||
JsonMgr.Instance.SaveData(newEquipInfo, userName+"equip");
|
||||
//初始化玩家的物品信息,保存本地
|
||||
UserGoodsInfo newGoodsInfo = new UserGoodsInfo();
|
||||
newGoodsInfo.goods.Add(goodsData[0]);
|
||||
newGoodsInfo.goods[0].num = 1888;
|
||||
newGoodsInfo.goods.Add(goodsData[1]);
|
||||
newGoodsInfo.goods[1].num = 9999;
|
||||
JsonMgr.Instance.SaveData(newGoodsInfo, userName + "goods");
|
||||
//本地存储
|
||||
SavaRegisterData();
|
||||
//注册成功
|
||||
return 3;
|
||||
}
|
||||
|
||||
//验证用户名密码是否合法
|
||||
public bool CheckInfo(string userName, string passWord)
|
||||
{
|
||||
if (registerData.registerInfo.ContainsKey(userName))
|
||||
{
|
||||
//密码相同 证明 登录成功
|
||||
if (registerData.registerInfo[userName] == passWord)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//用户名和密码不合法
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
11
Assets/Scripts/GameScene/Data/GameDataMgr.cs.meta
Normal file
11
Assets/Scripts/GameScene/Data/GameDataMgr.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0114aaaf8e6e4834790622677f5edd1e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
13
Assets/Scripts/GameScene/Data/GoodsData.cs
Normal file
13
Assets/Scripts/GameScene/Data/GoodsData.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GoodsData
|
||||
{
|
||||
public string name;
|
||||
public int atkNum;
|
||||
public int defNum;
|
||||
public int num;
|
||||
public int goodsType;
|
||||
public string info;
|
||||
}
|
11
Assets/Scripts/GameScene/Data/GoodsData.cs.meta
Normal file
11
Assets/Scripts/GameScene/Data/GoodsData.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 566a2ac9aae55fb42bde54c2eb9d39b8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
27
Assets/Scripts/GameScene/Data/MonsterData.cs
Normal file
27
Assets/Scripts/GameScene/Data/MonsterData.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class MonsterData
|
||||
{
|
||||
//ID
|
||||
public int id;
|
||||
//츰俚
|
||||
public string name;
|
||||
//沂좆
|
||||
public int hp;
|
||||
//묑샌제
|
||||
public int atk;
|
||||
//렝徒제
|
||||
public int def;
|
||||
//묑샌珂쇌
|
||||
public float atkTime;
|
||||
//쥣柯쉽쟨
|
||||
public int stone;
|
||||
//都柯쉽쟨
|
||||
public int yuan;
|
||||
//밍膠奈<E886A0>
|
||||
public string color;
|
||||
//밍膠쓱썹
|
||||
public string state;
|
||||
}
|
11
Assets/Scripts/GameScene/Data/MonsterData.cs.meta
Normal file
11
Assets/Scripts/GameScene/Data/MonsterData.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eada61699d25c614db64cd30a683aa77
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
49
Assets/Scripts/GameScene/Data/PlayerData.cs
Normal file
49
Assets/Scripts/GameScene/Data/PlayerData.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 人物注册默认的数据
|
||||
/// </summary>
|
||||
public class PlayerData
|
||||
{
|
||||
//玩家账号
|
||||
public string txtUser;
|
||||
//人物名字
|
||||
public string name;
|
||||
//拥有灵气
|
||||
public int gas = 0;
|
||||
//灵石数量
|
||||
public int stone = 0;
|
||||
//仙玉数量
|
||||
public int yu = 0;
|
||||
//人物血量
|
||||
public int hp=100;
|
||||
//攻击力
|
||||
public int atk=11;
|
||||
//防御力
|
||||
public int def=5;
|
||||
//攻速加成
|
||||
public float atkSpeed=0f;
|
||||
//暴击加成
|
||||
public float crit=0f;
|
||||
//暴击伤害
|
||||
public float critDamage=0f;
|
||||
//每分钟灵气
|
||||
public int minuteGas=60;
|
||||
//灵气加成
|
||||
public float gasAdd = 0f;
|
||||
//抗暴率加成
|
||||
public float kangCrit = 0f;
|
||||
//灵石加成
|
||||
public float stoneAdd = 0f;
|
||||
//人物境界
|
||||
public string state = "炼气境一重";
|
||||
//境界ID,对应升级属性的Id
|
||||
public int stateId = 0;
|
||||
//战斗力=血量*10+攻击力*20+防御力*20+攻速*1000+暴击*1000+暴击伤害*10+灵气加成*1+灵气加成*1000+抗爆率*1000+灵石加成*1000+每分钟灵气*10
|
||||
public long figthing = 1920;
|
||||
//攻击间隔
|
||||
public float atkTime = 1.5f;
|
||||
|
||||
}
|
11
Assets/Scripts/GameScene/Data/PlayerData.cs.meta
Normal file
11
Assets/Scripts/GameScene/Data/PlayerData.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ae4060251dbb8f4fb6d5acdef4b0b38
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11
Assets/Scripts/GameScene/Data/UserEquipInfo.cs
Normal file
11
Assets/Scripts/GameScene/Data/UserEquipInfo.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UserEquipInfo
|
||||
{
|
||||
//装备信息
|
||||
public Dictionary<string,EquipData> dressEquip = new Dictionary<string,EquipData>();
|
||||
//穿戴好的装备信息
|
||||
public List<EquipData> itemEquip = new List<EquipData>();
|
||||
}
|
11
Assets/Scripts/GameScene/Data/UserEquipInfo.cs.meta
Normal file
11
Assets/Scripts/GameScene/Data/UserEquipInfo.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9638582544feb954da247fece8632933
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/GameScene/Data/UserGoodsInfo.cs
Normal file
8
Assets/Scripts/GameScene/Data/UserGoodsInfo.cs
Normal file
@ -0,0 +1,8 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UserGoodsInfo
|
||||
{
|
||||
public List<GoodsData> goods=new List<GoodsData>();
|
||||
}
|
11
Assets/Scripts/GameScene/Data/UserGoodsInfo.cs.meta
Normal file
11
Assets/Scripts/GameScene/Data/UserGoodsInfo.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae210317eab4bbc49ace4df59b95ae5b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
24
Assets/Scripts/GameScene/Data/UserUpgradeData.cs
Normal file
24
Assets/Scripts/GameScene/Data/UserUpgradeData.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 玩家升级信息及加成
|
||||
/// </summary>
|
||||
public class UserUpgradeData
|
||||
{
|
||||
//境界
|
||||
public string state;
|
||||
//升级所需灵气
|
||||
public int gas;
|
||||
//血量加成
|
||||
public int hp;
|
||||
//攻击里加成
|
||||
public int atk;
|
||||
//防御力加成
|
||||
public int def;
|
||||
//每分钟灵气
|
||||
public int minuteGas;
|
||||
//字体颜色
|
||||
public string color;
|
||||
}
|
11
Assets/Scripts/GameScene/Data/UserUpgradeData.cs.meta
Normal file
11
Assets/Scripts/GameScene/Data/UserUpgradeData.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 78b33cb43af728d4c9b0ea3b4180e5eb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
36
Assets/Scripts/GameScene/FPSDisplay.cs
Normal file
36
Assets/Scripts/GameScene/FPSDisplay.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
namespace bonbon
|
||||
{
|
||||
public class FPSDisplay : MonoBehaviour
|
||||
{
|
||||
|
||||
float deltaTime = 0.0f;
|
||||
private void Awake()
|
||||
{
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
deltaTime += (Time.unscaledDeltaTime - deltaTime) * 0.1f;
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
int w = Screen.width, h = Screen.height;
|
||||
|
||||
GUIStyle style = new GUIStyle();
|
||||
|
||||
Rect rect = new Rect(0, 0, w, h * 2 / 100);
|
||||
style.alignment = TextAnchor.UpperLeft;
|
||||
style.fontSize = h * 2 / 100;
|
||||
style.normal.textColor = new Color(0.0f, 0.5f, 0f, 1.0f);
|
||||
float msec = deltaTime * 1000.0f;
|
||||
float fps = 1.0f / deltaTime;
|
||||
string text = string.Format("{0:0.0} ms ({1:0.} fps)", msec, fps);
|
||||
GUI.Label(rect, text, style);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/FPSDisplay.cs.meta
Normal file
11
Assets/Scripts/GameScene/FPSDisplay.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a472bb30c46a5f34780b298def8ed04c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
128
Assets/Scripts/GameScene/GameMgr.cs
Normal file
128
Assets/Scripts/GameScene/GameMgr.cs
Normal file
@ -0,0 +1,128 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using UnityEngine;
|
||||
|
||||
public class GameMgr:SingletonAutoMono<GameMgr>
|
||||
{
|
||||
//玩家是否开始攻击
|
||||
public bool isStartAtk = true;
|
||||
|
||||
//飞剑是否应该消失
|
||||
public bool isFeijianClose = false;
|
||||
|
||||
//人物界面灵气和弹窗是否立即消失
|
||||
public bool isUserNumAndGas = false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
StartCoroutine(UserGasAdd());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上线后每5秒自动加灵气
|
||||
/// </summary>
|
||||
IEnumerator UserGasAdd()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
yield return new WaitForSeconds(5f);
|
||||
//具体显示的灵气数值
|
||||
int gas = GameDataMgr.Instance.player.minuteGas / 12;
|
||||
GameDataMgr.Instance.player.gas += gas;
|
||||
if (UIManager.Instance.GetPanel<UserPanel>()!=null)
|
||||
{
|
||||
EventCenter.Instance.EventTrigger<int>(E_EventType.E_Pool_GasTip,gas);
|
||||
}
|
||||
//更新TopPanel面板上的数据
|
||||
if (UIManager.Instance.GetPanel<TopPanel>() != null)
|
||||
{
|
||||
UIManager.Instance.GetPanel<TopPanel>().UpdatePanel();
|
||||
}
|
||||
//保存玩家数据
|
||||
GameDataMgr.Instance.PlayerDataSave();
|
||||
}
|
||||
}
|
||||
|
||||
//玩家和怪物重置方法
|
||||
public void StartInit()
|
||||
{
|
||||
StartCoroutine(InitPlayerAndMonster());
|
||||
}
|
||||
|
||||
//玩家或者怪物死亡时,等待1s,重置怪物和玩家
|
||||
private IEnumerator InitPlayerAndMonster()
|
||||
{
|
||||
yield return new WaitForSeconds(2f);
|
||||
EventCenter.Instance.EventTrigger(E_EventType.E_Player_Init);
|
||||
EventCenter.Instance.EventTrigger(E_EventType.E_Monster_Init);
|
||||
//开启攻击
|
||||
isStartAtk = true;
|
||||
}
|
||||
|
||||
// 将数字转换为简化后的表示
|
||||
public string SetNumber(long num)
|
||||
{
|
||||
if (num >= 1000000)
|
||||
{
|
||||
return ((float)num / 1000000).ToString("F2") + "百万";
|
||||
}
|
||||
else if (num >= 10000)
|
||||
{
|
||||
return ((float)num / 10000).ToString("F2") + "万";
|
||||
}
|
||||
else if (num >= 100000000)
|
||||
{
|
||||
return ((float)num / 100000000).ToString("F2") + "亿";
|
||||
}
|
||||
else
|
||||
{
|
||||
return num.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
// 将十六进制颜色转换为 Color
|
||||
public Color HexToColor(string hex)
|
||||
{
|
||||
byte r = byte.Parse(hex.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
|
||||
byte g = byte.Parse(hex.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
|
||||
byte b = byte.Parse(hex.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
|
||||
return new Color32(r, g, b, 255);
|
||||
}
|
||||
|
||||
public Color HexToColorAlaph(string hex)
|
||||
{
|
||||
byte r = byte.Parse(hex.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
|
||||
byte g = byte.Parse(hex.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
|
||||
byte b = byte.Parse(hex.Substring(4, 2), System.Globalization.NumberStyles.HexNumber);
|
||||
return new Color32(r, g, b, 120);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 弹出获得奖励消息
|
||||
/// </summary>
|
||||
/// <param name="stone"></param>
|
||||
/// <param name="yu"></param>
|
||||
/// <param name="gas"></param>
|
||||
public void StartTip(int stone, int yuan)
|
||||
{
|
||||
StartCoroutine(TipMessage(stone, yuan));
|
||||
}
|
||||
/// <summary>
|
||||
/// 弹窗奖励消息协程
|
||||
/// </summary>
|
||||
/// <param name="stone"></param>
|
||||
/// <param name="yu"></param>
|
||||
/// <param name="gas"></param>
|
||||
/// <returns></returns>
|
||||
IEnumerator TipMessage(int stone, int yuan)
|
||||
{
|
||||
if (UIManager.Instance.GetPanel<TopPanel>() != null)
|
||||
{
|
||||
UIManager.Instance.GetPanel<TopPanel>().UpdatePanel();
|
||||
}
|
||||
EventCenter.Instance.EventTrigger<string>(E_EventType.E_Pool_Register2, "你获得了灵石+" + SetNumber(stone));
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
EventCenter.Instance.EventTrigger<string>(E_EventType.E_Pool_Register2, "你获得了源石+" + yuan);
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/GameMgr.cs.meta
Normal file
11
Assets/Scripts/GameScene/GameMgr.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d696d3f966233b54aac2b54e4ea3c792
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
19
Assets/Scripts/GameScene/Main.cs
Normal file
19
Assets/Scripts/GameScene/Main.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Main : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
Time.timeScale = 0f;
|
||||
UIManager.Instance.ShowPanel<LoginPanel>(E_UILayer.Bottom);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/Main.cs.meta
Normal file
11
Assets/Scripts/GameScene/Main.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebb1127d0b2253e49882c64b6db1a1f8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
26
Assets/Scripts/GameScene/SoundManager.cs
Normal file
26
Assets/Scripts/GameScene/SoundManager.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SoundManager : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private AudioSource audioSource;
|
||||
[SerializeField]
|
||||
private AudioClip bg;
|
||||
void Start()
|
||||
{
|
||||
audioSource=GetComponent<AudioSource>();
|
||||
}
|
||||
|
||||
public void playBg()
|
||||
{
|
||||
audioSource.clip = bg;
|
||||
audioSource.Play();
|
||||
}
|
||||
public void stopBg()
|
||||
{
|
||||
audioSource.Stop();
|
||||
}
|
||||
|
||||
}
|
11
Assets/Scripts/GameScene/SoundManager.cs.meta
Normal file
11
Assets/Scripts/GameScene/SoundManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33c0b99e76cad294c864d585337f94a6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/GameScene/UI.meta
Normal file
8
Assets/Scripts/GameScene/UI.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 221d1f21de951734fb18b3839bf0aaac
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
176
Assets/Scripts/GameScene/UI/BagPanel.cs
Normal file
176
Assets/Scripts/GameScene/UI/BagPanel.cs
Normal file
@ -0,0 +1,176 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class BagPanel : BasePanel
|
||||
{
|
||||
//按钮初始颜色是白色 点击后变成灰色
|
||||
private string imgColor = "6A6A6A";
|
||||
//按钮字体初始颜色 灰青
|
||||
private string txtColor1 = "225555";
|
||||
//按钮字体点击颜色 浅灰
|
||||
private string txtColor2 = "CDDACF";
|
||||
|
||||
public Button btnAll;
|
||||
public Button btnMater;
|
||||
public Button btnPill;
|
||||
public Button btnGong;
|
||||
|
||||
public Text txtAll;
|
||||
public Text txtMater;
|
||||
public Text txtPill;
|
||||
public Text txtGong;
|
||||
public Text txtStone;
|
||||
public Text txtYu;
|
||||
public Text txtInfo;
|
||||
|
||||
public ScrollRect sv;
|
||||
|
||||
//物品预设体
|
||||
public GameObject btnMaterial;
|
||||
|
||||
//选择的按钮
|
||||
private Button btnChoose;
|
||||
//选择的文字
|
||||
private Text txtChoose;
|
||||
|
||||
private UserGoodsInfo goods;
|
||||
//装备集合,用于更新页面
|
||||
private List<GameObject> goodsList = new List<GameObject>();
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
btnChoose = btnAll;
|
||||
txtChoose = txtAll;
|
||||
goods=GameDataMgr.Instance.userGoods;
|
||||
UpdatePanel();
|
||||
|
||||
//全部按钮
|
||||
btnAll.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnAll)
|
||||
{
|
||||
//更新界面
|
||||
UpdateAllGoods();
|
||||
}
|
||||
});
|
||||
//材料按钮
|
||||
btnMater.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnMater)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnMater, txtMater);
|
||||
UpdateGoods(2);
|
||||
}
|
||||
});
|
||||
//丹药按钮
|
||||
btnPill.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnPill)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnPill, txtPill);
|
||||
UpdateGoods(1);
|
||||
}
|
||||
});
|
||||
//功法按钮
|
||||
btnGong.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnGong)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnGong, txtGong);
|
||||
UpdateGoods(3);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按钮点击改变按钮的颜色
|
||||
/// </summary>
|
||||
/// <param name="btn"></param>
|
||||
/// <param name="txt"></param>
|
||||
public void SetColor(Button btn, Text txt)
|
||||
{
|
||||
//设置颜色前先把上一次的按钮颜色重置
|
||||
if (btnChoose != null && txtChoose != null)
|
||||
{
|
||||
btnChoose.image.color = Color.white;
|
||||
txtChoose.color = GameMgr.Instance.HexToColor(txtColor1);
|
||||
}
|
||||
//然后设置此次点击的按钮颜色
|
||||
btn.image.color = GameMgr.Instance.HexToColor(imgColor);
|
||||
txt.color = GameMgr.Instance.HexToColor(txtColor2);
|
||||
//设置为新的按钮,方便下一次重置颜色
|
||||
btnChoose = btn;
|
||||
txtChoose = txt;
|
||||
}
|
||||
|
||||
//更新面板
|
||||
public void UpdatePanel()
|
||||
{
|
||||
UpdateAllGoods();
|
||||
SetColor(btnAll, txtAll);
|
||||
txtStone.text = "灵石:"+GameMgr.Instance.SetNumber(GameDataMgr.Instance.player.stone);
|
||||
txtYu.text = "仙玉:"+GameMgr.Instance.SetNumber(GameDataMgr.Instance.player.yu);
|
||||
}
|
||||
|
||||
//全部物品
|
||||
private void UpdateAllGoods()
|
||||
{
|
||||
//先清空物品列表
|
||||
for (int i = 0; i < goodsList.Count; i++)
|
||||
{
|
||||
Destroy(goodsList[i]);
|
||||
}
|
||||
goodsList.Clear();
|
||||
|
||||
for (int i = 0; i < goods.goods.Count; i++)
|
||||
{
|
||||
GameObject go = Instantiate(btnMaterial);
|
||||
go.GetComponent<BtnMaterial>().UpdatePanel(goods.goods[i]);
|
||||
go.transform.SetParent(sv.content, false);
|
||||
goodsList.Add(go);
|
||||
}
|
||||
|
||||
txtInfo.text = "";
|
||||
}
|
||||
|
||||
private void UpdateGoods(int goodsType)
|
||||
{
|
||||
//1丹药,2材料
|
||||
//先清空物品列表
|
||||
for (int i = 0; i < goodsList.Count; i++)
|
||||
{
|
||||
Destroy(goodsList[i]);
|
||||
}
|
||||
goodsList.Clear();
|
||||
|
||||
for (int i = 0; i < goods.goods.Count; i++)
|
||||
{
|
||||
if (goods.goods[i].goodsType == goodsType)
|
||||
{
|
||||
GameObject go = Instantiate(btnMaterial);
|
||||
go.GetComponent<BtnMaterial>().UpdatePanel(goods.goods[i]);
|
||||
go.transform.SetParent(sv.content, false);
|
||||
goodsList.Add(go);
|
||||
}
|
||||
}
|
||||
txtInfo.text = "";
|
||||
}
|
||||
|
||||
//文字描述
|
||||
public void UpdateTxtInfo(GoodsData info)
|
||||
{
|
||||
txtInfo.text = "物品名称:"+info.name+"\n物品描述:"+info.info;
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/UI/BagPanel.cs.meta
Normal file
11
Assets/Scripts/GameScene/UI/BagPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e97b832fa844b7479075ee45d3e980a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
286
Assets/Scripts/GameScene/UI/BattlePanel.cs
Normal file
286
Assets/Scripts/GameScene/UI/BattlePanel.cs
Normal file
@ -0,0 +1,286 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class BattlePanel : BasePanel
|
||||
{
|
||||
//地图境界
|
||||
public Text txtTitle;
|
||||
//奖励
|
||||
public Text txtAward;
|
||||
|
||||
//降低地图
|
||||
public Button btnLowMap;
|
||||
//提升地图
|
||||
public Button btnUpMap;
|
||||
//降低一层
|
||||
public Button btnLowLev;
|
||||
//提升一层
|
||||
public Button btnUpLev;
|
||||
|
||||
//玩家对象
|
||||
public PlayerObject playerObj;
|
||||
//怪物对象
|
||||
public MonsterObject monsterObj;
|
||||
|
||||
//伤害数字
|
||||
public Transform damageUser;
|
||||
public Transform damageMonster;
|
||||
|
||||
//对象池点1,2
|
||||
public Transform target1;
|
||||
public Transform target2;
|
||||
|
||||
|
||||
void Awake()
|
||||
{
|
||||
//显示面板即把时间缩放变为1
|
||||
if (Time.timeScale<1)
|
||||
{
|
||||
Time.timeScale = 1f;
|
||||
}
|
||||
|
||||
//注册伤害数字弹出事件
|
||||
EventCenter.Instance.AddEventListener<int>(E_EventType.E_Player_DamageNum, DamageUserNum);
|
||||
EventCenter.Instance.AddEventListener<int>(E_EventType.E_Monster_DamageNum, DamageMonsterNum);
|
||||
//注册重置玩家和怪物数据
|
||||
EventCenter.Instance.AddEventListener(E_EventType.E_Player_Init,InitPlayerPanel);
|
||||
EventCenter.Instance.AddEventListener(E_EventType.E_Monster_Init,InitMonsterPanel);
|
||||
//注册弹窗信息
|
||||
EventCenter.Instance.AddEventListener<string>(E_EventType.E_Pool_Register1, PoolTipTarget1);
|
||||
EventCenter.Instance.AddEventListener<string>(E_EventType.E_Pool_Register2, PoolTipTarget2);
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
//刚进来需要更新面板
|
||||
UpdatePanel();
|
||||
|
||||
//点击降低地图按钮做什么
|
||||
btnLowMap.onClick.AddListener(() =>
|
||||
{
|
||||
//按钮被点击提示面板
|
||||
BtnOnclick2("降低地图按钮被点击了");
|
||||
UpOrDownMap(-10, GameDataMgr.Instance.nowMonster);
|
||||
});
|
||||
//点击提升地图按钮做什么
|
||||
btnUpMap.onClick.AddListener(() =>
|
||||
{
|
||||
BtnOnclick2("提升地图按钮被点击了");
|
||||
UpOrDownMap(10, GameDataMgr.Instance.nowMonster);
|
||||
});
|
||||
//点击降低一层按钮做什么
|
||||
btnLowLev.onClick.AddListener(() =>
|
||||
{
|
||||
BtnOnclick2("降低一层按钮被点击了");
|
||||
UpOrDownLev(-1, GameDataMgr.Instance.nowMonster);
|
||||
});
|
||||
//点击提升一层按钮做什么
|
||||
btnUpLev.onClick.AddListener(() =>
|
||||
{
|
||||
BtnOnclick2("提升一层按钮被点击了");
|
||||
UpOrDownLev(1, GameDataMgr.Instance.nowMonster);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提升或降低一层境界
|
||||
/// </summary>
|
||||
/// <param name="num">提升或降低多少层数</param>
|
||||
/// <param name="nowMonster">当前的怪物数据</param>
|
||||
private void UpOrDownLev(int num,MonsterData monster)
|
||||
{
|
||||
int nowMonsterNum = GameDataMgr.Instance.monsters.IndexOf(monster);
|
||||
int index1=nowMonsterNum/10;
|
||||
nowMonsterNum += num;
|
||||
int index2=nowMonsterNum/10;
|
||||
if (nowMonsterNum > GameDataMgr.Instance.monsters.Count-1)
|
||||
{
|
||||
BtnOnclick1("怪物已达到最高境界");
|
||||
return;
|
||||
}
|
||||
if (nowMonsterNum < 0)
|
||||
{
|
||||
BtnOnclick1("怪物已是最低境界");
|
||||
return;
|
||||
}
|
||||
|
||||
//改变地图成功
|
||||
if (index1==index2)
|
||||
{
|
||||
//飞剑需要放入对象池
|
||||
GameMgr.Instance.isFeijianClose = true;
|
||||
|
||||
GameDataMgr.Instance.nowMonster = GameDataMgr.Instance.monsters[nowMonsterNum];
|
||||
//重置面板 包括玩家数据 怪物数据
|
||||
UpdatePanel();
|
||||
|
||||
if (num>0)
|
||||
{
|
||||
BtnOnclick1("境界提高,怪物已更新");
|
||||
}
|
||||
else
|
||||
{
|
||||
BtnOnclick1("境界降低,怪物已更新");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BtnOnclick1("请提升角色境界");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 地图提升或降低
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <param name="nowMonster"></param>
|
||||
private void UpOrDownMap(int num, MonsterData monster)
|
||||
{
|
||||
int nowMonsterNum = GameDataMgr.Instance.monsters.IndexOf(monster);
|
||||
//每次提升或降低地图都是从每十层的第一层开始
|
||||
nowMonsterNum =nowMonsterNum/10*10+num;
|
||||
|
||||
if (nowMonsterNum > GameDataMgr.Instance.monsters.Count-1)
|
||||
{
|
||||
BtnOnclick1("怪物已达到最高境界");
|
||||
return;
|
||||
}
|
||||
if (nowMonsterNum < 0)
|
||||
{
|
||||
BtnOnclick1("怪物已是最低境界");
|
||||
return;
|
||||
}
|
||||
//改变地图成功
|
||||
if (GameDataMgr.Instance.player.stateId >= nowMonsterNum)
|
||||
{
|
||||
//飞剑需要放入对象池
|
||||
GameMgr.Instance.isFeijianClose = true;
|
||||
|
||||
GameDataMgr.Instance.nowMonster = GameDataMgr.Instance.monsters[nowMonsterNum];
|
||||
//重置面板 包括玩家数据 怪物数据
|
||||
UpdatePanel();
|
||||
|
||||
if (num > 0)
|
||||
{
|
||||
BtnOnclick1("境界提高,怪物已更新");
|
||||
}
|
||||
else
|
||||
{
|
||||
BtnOnclick1("境界降低,怪物已更新");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BtnOnclick1("请提升角色境界");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新战斗面板上的界面显示
|
||||
/// </summary>
|
||||
private void UpdatePanel()
|
||||
{
|
||||
MonsterData monster = GameDataMgr.Instance.nowMonster;
|
||||
//固定奖励
|
||||
txtAward.text = "固定奖励:" + "灵石+" + GameMgr.Instance.SetNumber(monster.stone) + ",源石+" + monster.yuan;
|
||||
//地图境界
|
||||
txtTitle.text = monster.state;
|
||||
//玩家是否开始攻击-开始
|
||||
GameMgr.Instance.isStartAtk = true;
|
||||
//飞剑回收仓库
|
||||
GameMgr.Instance.isFeijianClose = true;
|
||||
|
||||
//重置玩家的数据和面板
|
||||
InitPlayerPanel();
|
||||
//重置怪物的数据和面板
|
||||
InitMonsterPanel();
|
||||
}
|
||||
|
||||
//上方提示栏
|
||||
private void BtnOnclick1(string str)
|
||||
{
|
||||
EventCenter.Instance.EventTrigger(E_EventType.E_Pool_Register1, str);
|
||||
}
|
||||
//下方提示栏
|
||||
private void BtnOnclick2(string str)
|
||||
{
|
||||
EventCenter.Instance.EventTrigger(E_EventType.E_Pool_Register2, str);
|
||||
}
|
||||
|
||||
//初始化玩家的面板
|
||||
private void InitPlayerPanel()
|
||||
{
|
||||
EventCenter.Instance.Claer(E_EventType.E_Player_Wound);
|
||||
if (!playerObj.gameObject.activeSelf)
|
||||
{
|
||||
playerObj.gameObject.SetActive(true);
|
||||
}
|
||||
playerObj.UpdatePanel();
|
||||
}
|
||||
//初始化怪物的面板
|
||||
private void InitMonsterPanel()
|
||||
{
|
||||
EventCenter.Instance.Claer(E_EventType.E_Monster_Wound);
|
||||
if (!monsterObj.gameObject.activeSelf)
|
||||
{
|
||||
monsterObj.gameObject.SetActive(true);
|
||||
}
|
||||
monsterObj.UpdatePanel();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 伤害数字弹窗1
|
||||
/// </summary>
|
||||
private void DamageUserNum(int damageHp)
|
||||
{
|
||||
//弹出减血量数字
|
||||
GameObject go = PoolMgr.Instance.GetObj("Object/DamageNum");
|
||||
go.transform.SetParent(damageUser, false);
|
||||
go.transform.localPosition = Vector3.zero;
|
||||
go.transform.localScale = Vector3.one;
|
||||
go.GetComponent<DamageNum>().UpdateTxtInfo("-" + damageHp);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 伤害数字弹窗2
|
||||
/// </summary>
|
||||
private void DamageMonsterNum(int damageHp)
|
||||
{
|
||||
//弹出减血量数字
|
||||
GameObject go = PoolMgr.Instance.GetObj("Object/DamageNum");
|
||||
go.transform.SetParent(damageMonster, false);
|
||||
go.transform.localPosition = Vector3.zero;
|
||||
go.transform.localScale = Vector3.one;
|
||||
go.GetComponent<DamageNum>().UpdateTxtInfo("-" + damageHp);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公用的弹窗点1事件添加进事件中心
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
private void PoolTipTarget1(string str)
|
||||
{
|
||||
GameObject obj = PoolMgr.Instance.GetObj("Object/TipTool");
|
||||
obj.transform.SetParent(target1, false);
|
||||
obj.transform.localPosition = Vector3.zero;
|
||||
obj.transform.localScale = Vector3.one;
|
||||
obj.GetComponent<TipTool>().UpdateTxtInfo(str);
|
||||
}
|
||||
/// <summary>
|
||||
/// 公用的弹窗点1事件添加进事件中心
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
private void PoolTipTarget2(string str)
|
||||
{
|
||||
GameObject obj = PoolMgr.Instance.GetObj("Object/TipTool");
|
||||
obj.transform.SetParent(target2, false);
|
||||
obj.transform.localPosition = Vector3.zero;
|
||||
obj.transform.localScale = Vector3.one;
|
||||
obj.GetComponent<TipTool>().UpdateTxtInfo(str);
|
||||
}
|
||||
|
||||
}
|
11
Assets/Scripts/GameScene/UI/BattlePanel.cs.meta
Normal file
11
Assets/Scripts/GameScene/UI/BattlePanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bffb8c7835da70b40a4eed435b2b8450
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
Assets/Scripts/GameScene/UI/BookPanel.cs
Normal file
16
Assets/Scripts/GameScene/UI/BookPanel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class BookPanel : BasePanel
|
||||
{
|
||||
public Button btnClose;
|
||||
public override void Init()
|
||||
{
|
||||
btnClose.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.HidePanel<BookPanel>();
|
||||
});
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/UI/BookPanel.cs.meta
Normal file
11
Assets/Scripts/GameScene/UI/BookPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d401e749496106d448650d075169bf7e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
Assets/Scripts/GameScene/UI/ChainPanel.cs
Normal file
16
Assets/Scripts/GameScene/UI/ChainPanel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ChainPanel : BasePanel
|
||||
{
|
||||
public Button btnClose;
|
||||
public override void Init()
|
||||
{
|
||||
btnClose.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.HidePanel<ChainPanel>();
|
||||
});
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/UI/ChainPanel.cs.meta
Normal file
11
Assets/Scripts/GameScene/UI/ChainPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3f0520dcf59fb340ab229c429ca6b33
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
203
Assets/Scripts/GameScene/UI/EquipInfoPanel.cs
Normal file
203
Assets/Scripts/GameScene/UI/EquipInfoPanel.cs
Normal file
@ -0,0 +1,203 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class EquipInfoPanel : BasePanel
|
||||
{
|
||||
public Button btnClose;
|
||||
public Button btnDress;
|
||||
public Button btnFenjie;
|
||||
public Button btnChong;
|
||||
|
||||
public Text txtName;
|
||||
public Text txtJingjie;
|
||||
public Text txtQuality;
|
||||
|
||||
public Transform basicAtt;
|
||||
public Transform addAtt;
|
||||
public GameObject txtEntry;
|
||||
|
||||
//本装备属性
|
||||
private EquipData equipData;
|
||||
private PlayerData player;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
player = GameDataMgr.Instance.player;
|
||||
|
||||
btnClose.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.HidePanel<EquipInfoPanel>();
|
||||
});
|
||||
btnDress.onClick.AddListener(() =>
|
||||
{
|
||||
DressEquip();
|
||||
UIManager.Instance.HidePanel<EquipInfoPanel>();
|
||||
});
|
||||
btnFenjie.onClick.AddListener(() =>
|
||||
{
|
||||
|
||||
});
|
||||
btnChong.onClick.AddListener(() =>
|
||||
{
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
//给外界更新面板的方法
|
||||
public void UpdatePanel(EquipData equip)
|
||||
{
|
||||
equipData = equip;
|
||||
|
||||
txtName.text=equip.name;
|
||||
txtName.color = GameMgr.Instance.HexToColor(equip.color);
|
||||
txtName.gameObject.GetComponent<Outline>().effectColor = GameMgr.Instance.HexToColorAlaph(equip.color);
|
||||
|
||||
txtJingjie.text=equip.name.Substring(0,2);
|
||||
txtJingjie.color = GameMgr.Instance.HexToColor(equip.color);
|
||||
txtJingjie.gameObject.GetComponent<Outline>().effectColor = GameMgr.Instance.HexToColorAlaph(equip.color);
|
||||
|
||||
txtQuality.text = equip.colorName;
|
||||
txtQuality.color = GameMgr.Instance.HexToColor(equip.color);
|
||||
txtQuality.gameObject.GetComponent<Outline>().effectColor = GameMgr.Instance.HexToColorAlaph(equip.color);
|
||||
|
||||
CreateTxtEntry(equip);
|
||||
}
|
||||
|
||||
//更新装备属性条
|
||||
private void CreateTxtEntry(EquipData equip)
|
||||
{
|
||||
GameObject go;
|
||||
if (equip.hp!=0)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(basicAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("血量+"+equip.hp);
|
||||
}
|
||||
if (equip.atk != 0)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(basicAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("攻击力+" + equip.atk);
|
||||
}
|
||||
if (equip.def != 0)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(basicAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("防御力+" + equip.def);
|
||||
}
|
||||
if (equip.crit != 0f)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(basicAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("暴击率+" + equip.crit+"%");
|
||||
}
|
||||
if (equip.critDamage != 0f)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(basicAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("暴击伤害+" + equip.critDamage + "%");
|
||||
}
|
||||
if (equip.atkSpeed != 0f)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(addAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("攻击速度+" + equip.atkSpeed + "%");
|
||||
}
|
||||
if (equip.kangCrit != 0f)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(addAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("抗爆率+" + equip.kangCrit + "%");
|
||||
}
|
||||
if (equip.gasAdd != 0f)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(addAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("灵气加成+" + equip.gasAdd + "%");
|
||||
}
|
||||
if (equip.yuAdd != 0f)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(addAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("仙玉加成+" + equip.yuAdd + "%");
|
||||
}
|
||||
if (equip.stoneAdd != 0f)
|
||||
{
|
||||
go = Instantiate(txtEntry);
|
||||
go.transform.SetParent(addAtt, false);
|
||||
go.GetComponent<TxtEntry>().UpdatePanel("灵石加成+" + equip.stoneAdd + "%");
|
||||
}
|
||||
}
|
||||
|
||||
//玩家点击穿戴
|
||||
private void DressEquip()
|
||||
{
|
||||
GameDataMgr.Instance.userEquip.itemEquip.Remove(equipData);
|
||||
switch (equipData.equipType)
|
||||
{
|
||||
case 1:
|
||||
AddEquip("tou");
|
||||
break;
|
||||
case 2:
|
||||
AddEquip("yi");
|
||||
break;
|
||||
case 3:
|
||||
AddEquip("shou");
|
||||
break;
|
||||
case 4:
|
||||
AddEquip("yao");
|
||||
break;
|
||||
case 5:
|
||||
AddEquip("tui");
|
||||
break;
|
||||
case 6:
|
||||
AddEquip("xie");
|
||||
break;
|
||||
}
|
||||
//玩家属性增加
|
||||
PlayerDataAdd();
|
||||
//更新装备面板
|
||||
UIManager.Instance.GetPanel<EquipPanel>().UpdatePanel();
|
||||
//更新玩家属性面板
|
||||
UIManager.Instance.GetPanel<UserPanel>().UpdatePanel();
|
||||
//保存数据
|
||||
GameDataMgr.Instance.EquipDataSave();
|
||||
GameDataMgr.Instance.PlayerDataSave();
|
||||
}
|
||||
|
||||
private void AddEquip(string name)
|
||||
{
|
||||
if (GameDataMgr.Instance.userEquip.dressEquip.ContainsKey(name))
|
||||
{
|
||||
if (GameDataMgr.Instance.userEquip.dressEquip[name]!=null)
|
||||
{
|
||||
EquipData equip = GameDataMgr.Instance.userEquip.dressEquip[name];
|
||||
GameDataMgr.Instance.userEquip.dressEquip[name] = equipData;
|
||||
GameDataMgr.Instance.userEquip.itemEquip.Add(equip);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameDataMgr.Instance.userEquip.dressEquip[name] = equipData;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GameDataMgr.Instance.userEquip.dressEquip.Add(name, equipData);
|
||||
}
|
||||
}
|
||||
|
||||
private void PlayerDataAdd()
|
||||
{
|
||||
player.hp += equipData.hp;
|
||||
player.atk += equipData.atk;
|
||||
player.def += equipData.def;
|
||||
player.crit += equipData.crit;
|
||||
player.critDamage += equipData.critDamage;
|
||||
player.atkSpeed += equipData.atkSpeed;
|
||||
player.kangCrit += equipData.kangCrit;
|
||||
player.gasAdd += equipData.gasAdd;
|
||||
player.stoneAdd += equipData.stoneAdd;
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/UI/EquipInfoPanel.cs.meta
Normal file
11
Assets/Scripts/GameScene/UI/EquipInfoPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a807150a14d174d44bb348a3bfdce9eb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
284
Assets/Scripts/GameScene/UI/EquipPanel.cs
Normal file
284
Assets/Scripts/GameScene/UI/EquipPanel.cs
Normal file
@ -0,0 +1,284 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class EquipPanel : BasePanel
|
||||
{
|
||||
//按钮初始颜色是白色 点击后变成灰色
|
||||
private string imgColor = "A6A6A6";
|
||||
//按钮字体初始颜色 灰青
|
||||
private string txtColor1 = "4A5551";
|
||||
//按钮字体点击颜色 浅灰
|
||||
private string txtColor2 = "CDDACF";
|
||||
|
||||
public Button btnClose;
|
||||
public Button btnTou;
|
||||
public Button btnYi;
|
||||
public Button btnShou;
|
||||
public Button btnYao;
|
||||
public Button btnTui;
|
||||
public Button btnXie;
|
||||
public Text txtTou;
|
||||
public Text txtYi;
|
||||
public Text txtShou;
|
||||
public Text txtYao;
|
||||
public Text txtTui;
|
||||
public Text txtXie;
|
||||
|
||||
public Button btnAll;
|
||||
public Button btnToukui;
|
||||
public Button btnZhanPao;
|
||||
public Button btnHuShou;
|
||||
public Button btnHuYao;
|
||||
public Button btnHuTui;
|
||||
public Button btnZhanXue;
|
||||
public Button btnFenJie;
|
||||
|
||||
public Text txtAll;
|
||||
public Text txtToukui;
|
||||
public Text txtZhanPao;
|
||||
public Text txtHuShou;
|
||||
public Text txtHuYao;
|
||||
public Text txtHuTui;
|
||||
public Text txtZhanXue;
|
||||
public Text txtFenJie;
|
||||
|
||||
//上下滑动框
|
||||
public ScrollRect sv;
|
||||
|
||||
//装备预设体
|
||||
public GameObject btnEquip;
|
||||
|
||||
//选择的按钮
|
||||
private Button btnChoose;
|
||||
//选择的文字
|
||||
private Text txtChoose;
|
||||
|
||||
|
||||
private UserEquipInfo userEquip;
|
||||
//装备集合,用于更新页面
|
||||
private List<GameObject> equipList = new List<GameObject>();
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
btnChoose = btnAll;
|
||||
txtChoose = txtAll;
|
||||
userEquip = GameDataMgr.Instance.userEquip;
|
||||
|
||||
//进页面就更新界面
|
||||
UpdatePanel();
|
||||
|
||||
btnClose.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.HidePanel<EquipPanel>();
|
||||
});
|
||||
//全部按钮
|
||||
btnAll.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose!=btnAll)
|
||||
{
|
||||
//更新界面
|
||||
UpdateAllEquip();
|
||||
}
|
||||
});
|
||||
//头盔按钮
|
||||
btnToukui.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnToukui)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnToukui, txtToukui);
|
||||
UpdateEquip(1);
|
||||
}
|
||||
});
|
||||
//战袍按钮
|
||||
btnZhanPao.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnZhanPao)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnZhanPao, txtZhanPao);
|
||||
UpdateEquip(2);
|
||||
}
|
||||
});
|
||||
//护手按钮
|
||||
btnHuShou.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnHuShou)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnHuShou, txtHuShou);
|
||||
UpdateEquip(3);
|
||||
}
|
||||
});
|
||||
//护腰按钮
|
||||
btnHuYao.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnHuYao)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnHuYao, txtHuYao);
|
||||
UpdateEquip(4);
|
||||
}
|
||||
});
|
||||
//护腿按钮
|
||||
btnHuTui.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnHuTui)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnHuTui, txtHuTui);
|
||||
UpdateEquip(5);
|
||||
}
|
||||
});
|
||||
//战靴按钮
|
||||
btnZhanXue.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnZhanXue)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnZhanXue, txtZhanXue);
|
||||
UpdateEquip(6);
|
||||
}
|
||||
});
|
||||
//分解按钮
|
||||
btnFenJie.onClick.AddListener(() =>
|
||||
{
|
||||
//不是当前按钮才更新
|
||||
if (btnChoose != btnFenJie)
|
||||
{
|
||||
//更新界面
|
||||
//设置按钮颜色
|
||||
SetColor(btnFenJie, txtFenJie);
|
||||
UpdateAllEquip();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按钮点击改变按钮的颜色
|
||||
/// </summary>
|
||||
/// <param name="btn"></param>
|
||||
/// <param name="txt"></param>
|
||||
public void SetColor(Button btn, Text txt)
|
||||
{
|
||||
//设置颜色前先把上一次的按钮颜色重置
|
||||
if (btnChoose != null && txtChoose != null)
|
||||
{
|
||||
btnChoose.image.color = Color.white;
|
||||
txtChoose.color = GameMgr.Instance.HexToColor(txtColor1);
|
||||
}
|
||||
//然后设置此次点击的按钮颜色
|
||||
btn.image.color = GameMgr.Instance.HexToColor(imgColor);
|
||||
txt.color = GameMgr.Instance.HexToColor(txtColor2);
|
||||
//设置为新的按钮,方便下一次重置颜色
|
||||
btnChoose = btn;
|
||||
txtChoose = txt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 面板更新
|
||||
/// </summary>
|
||||
public void UpdatePanel()
|
||||
{
|
||||
//更新全部
|
||||
UpdateAllEquip();
|
||||
//设置按钮颜色
|
||||
SetColor(btnAll, txtAll);
|
||||
|
||||
//更新已穿戴装备
|
||||
if (userEquip.dressEquip.ContainsKey("tou"))
|
||||
{
|
||||
txtTou.text = userEquip.dressEquip["tou"].name;
|
||||
txtTou.color = GameMgr.Instance.HexToColor(userEquip.dressEquip["tou"].color);
|
||||
}
|
||||
if (userEquip.dressEquip.ContainsKey("yi"))
|
||||
{
|
||||
txtYi.text = userEquip.dressEquip["yi"].name;
|
||||
txtYi.color = GameMgr.Instance.HexToColor(userEquip.dressEquip["yi"].color);
|
||||
}
|
||||
if (userEquip.dressEquip.ContainsKey("shou"))
|
||||
{
|
||||
txtShou.text = userEquip.dressEquip["shou"].name;
|
||||
txtShou.color = GameMgr.Instance.HexToColor(userEquip.dressEquip["shou"].color);
|
||||
}
|
||||
if (userEquip.dressEquip.ContainsKey("yao"))
|
||||
{
|
||||
txtYao.text = userEquip.dressEquip["yao"].name;
|
||||
txtYao.color = GameMgr.Instance.HexToColor(userEquip.dressEquip["yao"].color);
|
||||
}
|
||||
if (userEquip.dressEquip.ContainsKey("tui"))
|
||||
{
|
||||
txtTui.text = userEquip.dressEquip["tui"].name;
|
||||
txtTui.color = GameMgr.Instance.HexToColor(userEquip.dressEquip["tui"].color);
|
||||
}
|
||||
if (userEquip.dressEquip.ContainsKey("xie"))
|
||||
{
|
||||
txtXie.text = userEquip.dressEquip["xie"].name;
|
||||
txtXie.color = GameMgr.Instance.HexToColor(userEquip.dressEquip["xie"].color);
|
||||
}
|
||||
}
|
||||
|
||||
//按钮点击更新页面
|
||||
private void UpdateEquip(int equipType)
|
||||
{
|
||||
//1 头,2衣服,3手,4腰,5腿,6鞋
|
||||
//先清空装备列表
|
||||
for (int i = 0; i < equipList.Count; i++)
|
||||
{
|
||||
Destroy(equipList[i]);
|
||||
}
|
||||
equipList.Clear();
|
||||
|
||||
for (int i = 0; i < userEquip.itemEquip.Count; i++)
|
||||
{
|
||||
if (userEquip.itemEquip[i].equipType==equipType)
|
||||
{
|
||||
GameObject go = Instantiate(btnEquip);
|
||||
go.GetComponent<BtnEquip>().UpdatePanel(userEquip.itemEquip[i]);
|
||||
go.transform.SetParent(sv.content, false);
|
||||
equipList.Add(go);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//全部装备
|
||||
private void UpdateAllEquip()
|
||||
{
|
||||
//先清空装备列表
|
||||
for (int i = 0; i < equipList.Count; i++)
|
||||
{
|
||||
Destroy(equipList[i]);
|
||||
}
|
||||
equipList.Clear();
|
||||
|
||||
for (int i = 0; i < userEquip.itemEquip.Count; i++)
|
||||
{
|
||||
GameObject go = Instantiate(btnEquip);
|
||||
go.GetComponent<BtnEquip>().UpdatePanel(userEquip.itemEquip[i]);
|
||||
go.transform.SetParent(sv.content,false);
|
||||
equipList.Add(go);
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
equipList = null;
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/UI/EquipPanel.cs.meta
Normal file
11
Assets/Scripts/GameScene/UI/EquipPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa3325ff996aa124f8a42f3d8d6704be
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
155
Assets/Scripts/GameScene/UI/LowerPanel.cs
Normal file
155
Assets/Scripts/GameScene/UI/LowerPanel.cs
Normal file
@ -0,0 +1,155 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LowerPanel : BasePanel
|
||||
{
|
||||
//按钮颜色,黄色
|
||||
private string imgColor1 = "#FF9F00";
|
||||
//按钮字体颜色,褐色
|
||||
private string txtColor1 = "#A89500";
|
||||
//暗蓝
|
||||
private string txtColor2 = "#255746";
|
||||
|
||||
public Button btnFight;
|
||||
public Button btnPerson;
|
||||
public Button btnBag;
|
||||
public Button btnWorld;
|
||||
|
||||
public TextMeshProUGUI txtFight;
|
||||
public TextMeshProUGUI txtPerson;
|
||||
public TextMeshProUGUI txtBag;
|
||||
public TextMeshProUGUI txtWorld;
|
||||
|
||||
//选择的按钮
|
||||
private Button btnChoose;
|
||||
//选择的文字
|
||||
private TextMeshProUGUI txtChoose;
|
||||
|
||||
//已选择的界面
|
||||
private BasePanel choosePanel;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
//刚进游戏,按钮和文字选择为战斗
|
||||
btnChoose = btnFight;
|
||||
txtChoose = txtFight;
|
||||
|
||||
//战斗按钮
|
||||
btnFight.onClick.AddListener(() =>
|
||||
{
|
||||
HidePanel(choosePanel);
|
||||
SetColor(btnFight, txtFight);
|
||||
UIManager.Instance.ShowPanel<BattlePanel>(E_UILayer.Bottom);
|
||||
if (UIManager.Instance.GetPanel<TopPanel>() == null)
|
||||
{
|
||||
UIManager.Instance.ShowPanel<TopPanel>(E_UILayer.System);
|
||||
}
|
||||
choosePanel = null;
|
||||
});
|
||||
//人物按钮
|
||||
btnPerson.onClick.AddListener(() =>
|
||||
{
|
||||
if (UIManager.Instance.GetPanel<UserPanel>() == null)
|
||||
{
|
||||
HidePanel(choosePanel);
|
||||
SetColor(btnPerson, txtPerson);
|
||||
UIManager.Instance.ShowPanel<UserPanel>(E_UILayer.Middle);
|
||||
|
||||
if (UIManager.Instance.GetPanel<TopPanel>() == null)
|
||||
{
|
||||
UIManager.Instance.ShowPanel<TopPanel>(E_UILayer.System);
|
||||
}
|
||||
choosePanel = UIManager.Instance.GetPanel<UserPanel>();
|
||||
}
|
||||
});
|
||||
//背包按钮
|
||||
btnBag.onClick.AddListener(() =>
|
||||
{
|
||||
if (UIManager.Instance.GetPanel<BagPanel>() == null)
|
||||
{
|
||||
HidePanel(choosePanel);
|
||||
SetColor(btnBag, txtBag);
|
||||
UIManager.Instance.ShowPanel<BagPanel>(E_UILayer.Middle);
|
||||
if (UIManager.Instance.GetPanel<TopPanel>()!=null)
|
||||
{
|
||||
UIManager.Instance.HidePanel<TopPanel>();
|
||||
}
|
||||
choosePanel = UIManager.Instance.GetPanel<BagPanel>();
|
||||
}
|
||||
});
|
||||
//世界按钮
|
||||
btnWorld.onClick.AddListener(() =>
|
||||
{
|
||||
if (UIManager.Instance.GetPanel<WorldPanel>() == null)
|
||||
{
|
||||
HidePanel(choosePanel);
|
||||
SetColor(btnWorld, txtWorld);
|
||||
UIManager.Instance.ShowPanel<WorldPanel>(E_UILayer.Middle);
|
||||
if (UIManager.Instance.GetPanel<TopPanel>() != null)
|
||||
{
|
||||
UIManager.Instance.HidePanel<TopPanel>();
|
||||
}
|
||||
choosePanel = UIManager.Instance.GetPanel<WorldPanel>();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按钮点击改变按钮的颜色
|
||||
/// </summary>
|
||||
/// <param name="btn"></param>
|
||||
/// <param name="txt"></param>
|
||||
public void SetColor(Button btn, TextMeshProUGUI txt)
|
||||
{
|
||||
Color imgColor, txtColor;
|
||||
//设置颜色前先把上一次的按钮颜色重置
|
||||
if (btnChoose!=null&&txtChoose!=null)
|
||||
{
|
||||
btnChoose.image.color = Color.white;
|
||||
if (ColorUtility.TryParseHtmlString(txtColor2, out txtColor))
|
||||
{
|
||||
txtChoose.color = txtColor;
|
||||
}
|
||||
}
|
||||
|
||||
//然后设置此次点击的按钮颜色
|
||||
if (ColorUtility.TryParseHtmlString(imgColor1, out imgColor))
|
||||
{
|
||||
btn.image.color = imgColor;
|
||||
if (ColorUtility.TryParseHtmlString(txtColor1, out txtColor))
|
||||
{
|
||||
txt.color = txtColor;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//设置为新的按钮,方便下一次重置颜色
|
||||
btnChoose = btn;
|
||||
txtChoose = txt;
|
||||
}
|
||||
|
||||
//隐藏面板
|
||||
private void HidePanel(BasePanel choosePanel)
|
||||
{
|
||||
//当选择为空时,返回
|
||||
if (choosePanel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
switch (choosePanel)
|
||||
{
|
||||
case UserPanel:
|
||||
UIManager.Instance.HidePanel<UserPanel>();
|
||||
break;
|
||||
case BagPanel:
|
||||
UIManager.Instance.HidePanel<BagPanel>();
|
||||
break;
|
||||
case WorldPanel:
|
||||
UIManager.Instance.HidePanel<WorldPanel>();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/UI/LowerPanel.cs.meta
Normal file
11
Assets/Scripts/GameScene/UI/LowerPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4287a03c2db0064ea11e6038e69b148
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
Assets/Scripts/GameScene/UI/MarketPanel.cs
Normal file
16
Assets/Scripts/GameScene/UI/MarketPanel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class MarketPanel : BasePanel
|
||||
{
|
||||
public Button btnClose;
|
||||
public override void Init()
|
||||
{
|
||||
btnClose.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.HidePanel<MarketPanel>();
|
||||
});
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/UI/MarketPanel.cs.meta
Normal file
11
Assets/Scripts/GameScene/UI/MarketPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 107b2bd0f657b234da3c9914ec960541
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
64
Assets/Scripts/GameScene/UI/PersonPanel.cs
Normal file
64
Assets/Scripts/GameScene/UI/PersonPanel.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class PersonPanel : BasePanel
|
||||
{
|
||||
//血量
|
||||
public Text txtHp;
|
||||
//防御
|
||||
public Text txtDef;
|
||||
//攻击
|
||||
public Text txtAtk;
|
||||
//攻击速度
|
||||
public Text txtAtkSpeed;
|
||||
//暴击率
|
||||
public Text txtCriChance;
|
||||
//暴击伤害
|
||||
public Text txtCriDamage;
|
||||
//每分钟灵气
|
||||
public Text txtMinuteAura;
|
||||
//灵气加成
|
||||
public Text txtBonusAura;
|
||||
//抗暴击率
|
||||
public Text txtAntRating;
|
||||
//灵石加成
|
||||
public Text txtBonusStone;
|
||||
//经验值
|
||||
public Text txtExp;
|
||||
|
||||
//灵剑按钮
|
||||
public Button btnSword;
|
||||
//装备按钮
|
||||
public Button btnEquip;
|
||||
//功法按钮
|
||||
public Button btnMethod;
|
||||
//炼体按钮
|
||||
public Button btnPower;
|
||||
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
//点击灵剑按钮做什么
|
||||
btnSword.onClick.AddListener(() =>
|
||||
{
|
||||
|
||||
});
|
||||
//点击装备按钮做什么
|
||||
btnEquip.onClick.AddListener(() =>
|
||||
{
|
||||
|
||||
});
|
||||
//点击功法按钮做什么
|
||||
btnMethod.onClick.AddListener(() =>
|
||||
{
|
||||
|
||||
});
|
||||
//点击炼体按钮做什么
|
||||
btnPower.onClick.AddListener(() =>
|
||||
{
|
||||
|
||||
});
|
||||
}
|
||||
}
|
11
Assets/Scripts/GameScene/UI/PersonPanel.cs.meta
Normal file
11
Assets/Scripts/GameScene/UI/PersonPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93e8d631b3043d947a40648c8d116060
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
Assets/Scripts/GameScene/UI/PrayPanel.cs
Normal file
16
Assets/Scripts/GameScene/UI/PrayPanel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class PrayPanel : BasePanel
|
||||
{
|
||||
public Button btnClose;
|
||||
public override void Init()
|
||||
{
|
||||
btnClose.onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.Instance.HidePanel<PrayPanel>();
|
||||
});
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user