宝箱添加点击详情

dev_chengFeng
yuanshuai 2022-07-06 11:40:35 +08:00
parent c7355221bd
commit 7f65810d70
2 changed files with 49 additions and 2 deletions

View File

@ -37022,7 +37022,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &5148739484638376218
RectTransform:
m_ObjectHideFlags: 0
@ -51277,6 +51277,7 @@ GameObject:
- component: {fileID: 6743334599692215934}
- component: {fileID: 4942739253467920590}
- component: {fileID: 4047812234912289829}
- component: {fileID: 7620457998452544379}
m_Layer: 5
m_Name: boxIcon
m_TagString: Untagged
@ -51325,7 +51326,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
@ -51359,6 +51360,48 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &7620457998452544379
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7739183248647446308}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
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_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_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 4942739253467920590}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!1 &7748943483106170027
GameObject:
m_ObjectHideFlags: 0

View File

@ -22,6 +22,7 @@ function this:InitComponent(gameObject)
this.okBtnTxt=Util.GetGameObject(gameObject,"OkBtn/Text"):GetComponent("Text")
this.okBtnTxt.text="领 取"
this.anim = Util.GetGameObject(gameObject, "Body/boxIcon"):GetComponent("Animator")
this.boxBtn = Util.GetGameObject(gameObject, "Body/boxIcon")
end
function this:BindEvent()
@ -41,6 +42,9 @@ function this:BindEvent()
--this:ShowInfo()
end)
end)
Util.AddClick(this.boxBtn,function()
UIManager.OpenPanel(UIName.RewardBoxPanel,nil,81185)
end)
end