抽奖
This commit is contained in:
parent
b33ea25402
commit
6e7020034b
@ -371,7 +371,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2677648104760152842, guid: 125f28881155bef4680416fe0205cd50, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
@ -403,7 +403,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2677648105837977425, guid: 125f28881155bef4680416fe0205cd50, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
|
@ -16,22 +16,42 @@ public class Anilottery : MonoBehaviour
|
||||
{
|
||||
RewardPanel.SetActive(false);
|
||||
}
|
||||
|
||||
public void OpenBox(int id = 0)//0是黄,1是紫
|
||||
public void ShowReward()
|
||||
{
|
||||
RewardPanel.SetActive(true);
|
||||
}
|
||||
public void OpenBox(int id )//0是黄,1是紫
|
||||
{
|
||||
if (id == 0)
|
||||
{
|
||||
PurpleBox.SetActive(false);
|
||||
YelloBox.SetActive(true);
|
||||
YelloAni.SetBool("IsOpen", true);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
YelloBox.SetActive(false);
|
||||
PurpleBox.SetActive(true);
|
||||
PurpleAni.SetBool("IsOpen", true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void OpenB(int id)//0是黄,1是紫
|
||||
{
|
||||
if (id == 0)
|
||||
{
|
||||
|
||||
YelloAni.SetBool("IsOpen", true);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
PurpleAni.SetBool("IsOpen", true);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public void ReturnState()//恢复动画状态
|
||||
{
|
||||
YelloAni.SetBool("IsOpen", false);
|
||||
|
@ -9,7 +9,8 @@ public class LotteryPanel : Base
|
||||
|
||||
public void ShowAni(int id)
|
||||
{
|
||||
Instantiate(AniPanel, transform);
|
||||
AniPanel.GetComponent<Anilottery>().OpenBox(id);
|
||||
|
||||
GameObject ani= Instantiate(AniPanel, transform);
|
||||
ani.GetComponent<Anilottery>().OpenBox(id);
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using UnityEngine.UI;
|
||||
using static UnityEditor.Progress;
|
||||
|
||||
|
||||
public class NewkuangchangItem : Base
|
||||
{
|
||||
|
@ -12,6 +12,8 @@ GameObject:
|
||||
- component: {fileID: 2795579586818369846}
|
||||
- component: {fileID: 2795579586818369841}
|
||||
- component: {fileID: 2795579586818369840}
|
||||
- component: {fileID: 3724767169095375708}
|
||||
- component: {fileID: 2258610971905236100}
|
||||
m_Layer: 5
|
||||
m_Name: YelloBox
|
||||
m_TagString: Untagged
|
||||
@ -98,6 +100,79 @@ Animator:
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!114 &3724767169095375708
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2795579586818369842}
|
||||
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: 2795579586818369841}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2795579587960038894}
|
||||
m_TargetAssemblyTypeName: Anilottery, Assembly-CSharp
|
||||
m_MethodName: OpenB
|
||||
m_Mode: 3
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &2258610971905236100
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2795579586818369842}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6bb02538693867840be5391bfcd4bde1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
YelloBox: {fileID: 0}
|
||||
YelloAni: {fileID: 0}
|
||||
PurpleBox: {fileID: 0}
|
||||
PurpleAni: {fileID: 0}
|
||||
RewardPanel: {fileID: 2795579587563206611}
|
||||
--- !u!1 &2795579586823481703
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -733,6 +808,8 @@ GameObject:
|
||||
- component: {fileID: 2795579588557807702}
|
||||
- component: {fileID: 2795579588557807697}
|
||||
- component: {fileID: 2795579588557807696}
|
||||
- component: {fileID: 1224069695147460078}
|
||||
- component: {fileID: 3420833047284714421}
|
||||
m_Layer: 5
|
||||
m_Name: PurpleBox
|
||||
m_TagString: Untagged
|
||||
@ -819,6 +896,79 @@ Animator:
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!114 &1224069695147460078
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2795579588557807698}
|
||||
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: 2795579588557807697}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2795579587960038894}
|
||||
m_TargetAssemblyTypeName: Anilottery, Assembly-CSharp
|
||||
m_MethodName: OpenB
|
||||
m_Mode: 3
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 1
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &3420833047284714421
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2795579588557807698}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6bb02538693867840be5391bfcd4bde1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
YelloBox: {fileID: 0}
|
||||
YelloAni: {fileID: 0}
|
||||
PurpleBox: {fileID: 0}
|
||||
PurpleAni: {fileID: 0}
|
||||
RewardPanel: {fileID: 2795579587563206611}
|
||||
--- !u!1001 &2795579586770844871
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -143,4 +143,11 @@ AnimationClip:
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
m_Events:
|
||||
- time: 0.8666667
|
||||
functionName: ShowReward
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
|
@ -143,4 +143,11 @@ AnimationClip:
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
m_Events:
|
||||
- time: 0.8666667
|
||||
functionName: ShowReward
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
intParameter: 0
|
||||
messageOptions: 0
|
||||
|
Loading…
Reference in New Issue
Block a user