改了几个注释base
This commit is contained in:
parent
ceb4fb78fc
commit
9b12888295
@ -229,7 +229,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 10
|
m_RootOrder: 9
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -761,7 +761,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 14
|
m_RootOrder: 13
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -1554,7 +1554,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 6
|
m_RootOrder: 5
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -1787,7 +1787,7 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 500353810}
|
- component: {fileID: 500353810}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: t3
|
m_Name: t3_woshe
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -2563,7 +2563,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -2619,7 +2619,7 @@ GameObject:
|
|||||||
- component: {fileID: 712977342}
|
- component: {fileID: 712977342}
|
||||||
- component: {fileID: 712977344}
|
- component: {fileID: 712977344}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: t1
|
m_Name: t1_kangchang
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -2824,7 +2824,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 9
|
m_RootOrder: 8
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -3035,7 +3035,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 5
|
m_RootOrder: 4
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -4235,7 +4235,7 @@ RectTransform:
|
|||||||
- {fileID: 1029618135}
|
- {fileID: 1029618135}
|
||||||
- {fileID: 1651110185}
|
- {fileID: 1651110185}
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 11
|
m_RootOrder: 10
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
@ -4644,7 +4644,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 13
|
m_RootOrder: 12
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -4996,7 +4996,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 12
|
m_RootOrder: 11
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -5857,7 +5857,7 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1434243873}
|
- component: {fileID: 1434243873}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: t4
|
m_Name: t4_game
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -6115,7 +6115,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -6247,7 +6247,7 @@ GameObject:
|
|||||||
- component: {fileID: 1535452030}
|
- component: {fileID: 1535452030}
|
||||||
- component: {fileID: 1535452032}
|
- component: {fileID: 1535452032}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: t2
|
m_Name: t2_shop
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -6266,7 +6266,6 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1152559004}
|
- {fileID: 1152559004}
|
||||||
- {fileID: 1588445219}
|
|
||||||
- {fileID: 1506854118}
|
- {fileID: 1506854118}
|
||||||
- {fileID: 666738525}
|
- {fileID: 666738525}
|
||||||
- {fileID: 1641027112}
|
- {fileID: 1641027112}
|
||||||
@ -6281,6 +6280,7 @@ RectTransform:
|
|||||||
- {fileID: 1153222779}
|
- {fileID: 1153222779}
|
||||||
- {fileID: 215141886}
|
- {fileID: 215141886}
|
||||||
- {fileID: 1745747365}
|
- {fileID: 1745747365}
|
||||||
|
- {fileID: 1588445219}
|
||||||
m_Father: {fileID: 1769459764}
|
m_Father: {fileID: 1769459764}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@ -6463,6 +6463,7 @@ GameObject:
|
|||||||
- component: {fileID: 1588445219}
|
- component: {fileID: 1588445219}
|
||||||
- component: {fileID: 1588445221}
|
- component: {fileID: 1588445221}
|
||||||
- component: {fileID: 1588445220}
|
- component: {fileID: 1588445220}
|
||||||
|
- component: {fileID: 1588445222}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: fangzhi
|
m_Name: fangzhi
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -6483,7 +6484,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 15
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -6528,6 +6529,50 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1588445218}
|
m_GameObject: {fileID: 1588445218}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &1588445222
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1588445218}
|
||||||
|
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: 1588445220}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
--- !u!1 &1609976658
|
--- !u!1 &1609976658
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -6635,7 +6680,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 4
|
m_RootOrder: 3
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -7091,7 +7136,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 15
|
m_RootOrder: 14
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -7167,7 +7212,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 8
|
m_RootOrder: 7
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -7243,7 +7288,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1535452030}
|
m_Father: {fileID: 1535452030}
|
||||||
m_RootOrder: 7
|
m_RootOrder: 6
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
@ -7297,6 +7342,7 @@ GameObject:
|
|||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1769459764}
|
- component: {fileID: 1769459764}
|
||||||
|
- component: {fileID: 1769459765}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: scene_main
|
m_Name: scene_main
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -7329,6 +7375,21 @@ RectTransform:
|
|||||||
m_AnchoredPosition: {x: -3760, y: 0}
|
m_AnchoredPosition: {x: -3760, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1769459765
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1769459763}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4819444941766254cb5bde5ba335d38e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
Panel: {fileID: 1588445218}
|
||||||
|
CloseBTN: {fileID: 0}
|
||||||
|
shop_btn: {fileID: 1588445222}
|
||||||
--- !u!1 &1789658826
|
--- !u!1 &1789658826
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,9 +2,9 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using DG.Tweening;
|
||||||
|
|
||||||
|
//MD FUCK Everthing
|
||||||
//md FUCK everthing
|
|
||||||
//ʷɽ£¬±ðѧ
|
//ʷɽ£¬±ðѧ
|
||||||
public class mainBTN : MonoBehaviour
|
public class mainBTN : MonoBehaviour
|
||||||
{
|
{
|
||||||
@ -53,11 +53,13 @@ public class mainBTN : MonoBehaviour
|
|||||||
BTN_2_2.SetActive(targetX == -3760);
|
BTN_2_2.SetActive(targetX == -3760);
|
||||||
BTN_3_3.SetActive(targetX == -5350);
|
BTN_3_3.SetActive(targetX == -5350);
|
||||||
|
|
||||||
// 启动协程,平滑移动 mainPanel
|
// 使用 DOTween 实现平滑移动
|
||||||
StartCoroutine(SmoothMovePanel(targetX, 0.3f));
|
mainPanelRect.DOKill(); // 杀死之前的动画,防止重复动画干扰
|
||||||
|
mainPanelRect.DOAnchorPosX(targetX, 0.3f).SetEase(Ease.Linear);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 协程实现平滑移动
|
//协程实现平滑移动
|
||||||
|
//web端协程消耗特别大,尽量不用
|
||||||
private IEnumerator SmoothMovePanel(float targetX, float duration)
|
private IEnumerator SmoothMovePanel(float targetX, float duration)
|
||||||
{
|
{
|
||||||
Vector2 startPosition = mainPanelRect.anchoredPosition;
|
Vector2 startPosition = mainPanelRect.anchoredPosition;
|
||||||
|
18
TheStrongestSnail/Assets/Scripts/Scene_main/main_game.cs
Normal file
18
TheStrongestSnail/Assets/Scripts/Scene_main/main_game.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class main_game : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 79ee244ec0a2f9b49b5a287b2da37e26
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,18 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class main_kuangchang : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ad36fa146833d7f49805b88476af158f
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
33
TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs
Normal file
33
TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using System;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using DG.Tweening;
|
||||||
|
|
||||||
|
public class main_shop :BaseUIPanel
|
||||||
|
{
|
||||||
|
public Button shop_btn;
|
||||||
|
|
||||||
|
public Canvas canvas;
|
||||||
|
public override void Start()
|
||||||
|
{
|
||||||
|
shop_btn.onClick.AddListener(() =>asyncOnShopBTN(shop_btn));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public async void asyncOnShopBTN(Button BTN)
|
||||||
|
{
|
||||||
|
await ButtonClickAnimationAsync(BTN.gameObject);
|
||||||
|
|
||||||
|
//Âß¼
|
||||||
|
this.ShopPanel();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override void ShopPanel()
|
||||||
|
{
|
||||||
|
GameObject.Instantiate(Panel, canvas.transform);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4819444941766254cb5bde5ba335d38e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
18
TheStrongestSnail/Assets/Scripts/Scene_main/main_woshe.cs
Normal file
18
TheStrongestSnail/Assets/Scripts/Scene_main/main_woshe.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class main_woshe : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a7caa74a5b9872845bbc6d2796b61241
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -10,19 +10,28 @@ using System.Threading.Tasks;
|
|||||||
//请将panel挂载一个空节点上,将这个脚本放空节点
|
//请将panel挂载一个空节点上,将这个脚本放空节点
|
||||||
public class BaseUIPanel : Base
|
public class BaseUIPanel : Base
|
||||||
{
|
{
|
||||||
[Header("变化的面板")]
|
[Header("显示隐藏的面板,根据重写,可以不给")]
|
||||||
public GameObject Panel;
|
public GameObject Panel;
|
||||||
|
|
||||||
[Header("CloseBTN")]
|
[Header("CloseBTN,根据重写,可以不给")]
|
||||||
public Button CloseBTN;
|
public Button CloseBTN;
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
public virtual void Start()
|
public virtual void Start()
|
||||||
{
|
{
|
||||||
HidePanel();
|
|
||||||
|
|
||||||
CloseBTN.onClick.AddListener(()=> {
|
if (Panel!=null)
|
||||||
|
{
|
||||||
HidePanel();
|
HidePanel();
|
||||||
});
|
}
|
||||||
|
|
||||||
|
if (CloseBTN!=null)
|
||||||
|
{
|
||||||
|
CloseBTN.onClick.AddListener(() => {
|
||||||
|
HidePanel();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -40,7 +49,7 @@ public class BaseUIPanel : Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 隐藏面板,可以重写
|
/// 隐藏面板,可以重写
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual async Task HidePanel()
|
public virtual async Task HidePanel()
|
||||||
{
|
{
|
||||||
|
4871
TheStrongestSnail/Assets/prefabs/shop.prefab
Normal file
4871
TheStrongestSnail/Assets/prefabs/shop.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
TheStrongestSnail/Assets/prefabs/shop.prefab.meta
Normal file
7
TheStrongestSnail/Assets/prefabs/shop.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4e48ee49e456fad4887407d7ee921b35
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
181
TheStrongestSnail/Assets/prefabs/shopPanel.prefab
Normal file
181
TheStrongestSnail/Assets/prefabs/shopPanel.prefab
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &6389689318277710002
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6389689318277710001}
|
||||||
|
- component: {fileID: 6389689318277710007}
|
||||||
|
- component: {fileID: 6389689318277710000}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: shopPanel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6389689318277710001
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6389689318277710002}
|
||||||
|
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: 2272232459515983223}
|
||||||
|
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 &6389689318277710007
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6389689318277710002}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &6389689318277710000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6389689318277710002}
|
||||||
|
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: 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!1001 &6389689319143782425
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 6389689318277710001}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_Pivot.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_Pivot.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5126270615579512175, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: shop
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
--- !u!224 &2272232459515983223 stripped
|
||||||
|
RectTransform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 6389689319143782425}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
7
TheStrongestSnail/Assets/prefabs/shopPanel.prefab.meta
Normal file
7
TheStrongestSnail/Assets/prefabs/shopPanel.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 21918674044dc0640af7d47f2617dca5
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user