diff --git a/meng_yao/Assets/Scenes/scene_Main.unity b/meng_yao/Assets/Scenes/scene_Main.unity index 8961df131..049c69d36 100644 --- a/meng_yao/Assets/Scenes/scene_Main.unity +++ b/meng_yao/Assets/Scenes/scene_Main.unity @@ -11684,7 +11684,7 @@ RectTransform: m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.14079998} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 21.68335, y: -71.2818} m_SizeDelta: {x: -43.3667, y: -143.90198} m_Pivot: {x: 0.5, y: 0.5} @@ -17103,7 +17103,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2246699873699369907, guid: da36d88841e59564b82d1d3d07b0f5ae, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 402 objectReference: {fileID: 0} - target: {fileID: 2246699873699369907, guid: da36d88841e59564b82d1d3d07b0f5ae, type: 3} propertyPath: m_AnchoredPosition.x @@ -17119,7 +17119,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2246699874307033262, guid: da36d88841e59564b82d1d3d07b0f5ae, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 2246699874307033263, guid: da36d88841e59564b82d1d3d07b0f5ae, type: 3} propertyPath: m_Pivot.x @@ -17239,19 +17239,19 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7429988234898114280, guid: da36d88841e59564b82d1d3d07b0f5ae, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 7429988234898114280, guid: da36d88841e59564b82d1d3d07b0f5ae, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 7429988234898114280, guid: da36d88841e59564b82d1d3d07b0f5ae, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 535 objectReference: {fileID: 0} - target: {fileID: 7429988234898114280, guid: da36d88841e59564b82d1d3d07b0f5ae, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -100.5 objectReference: {fileID: 0} - target: {fileID: 7429988235190062333, guid: da36d88841e59564b82d1d3d07b0f5ae, type: 3} propertyPath: m_AnchorMax.y @@ -18886,6 +18886,7 @@ GameObject: - component: {fileID: 677144438} - component: {fileID: 677144440} - component: {fileID: 677144439} + - component: {fileID: 677144441} m_Layer: 5 m_Name: Image m_TagString: Untagged @@ -18951,6 +18952,62 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 677144437} m_CullTransparentMesh: 1 +--- !u!114 &677144441 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 677144437} + 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: 677144439} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 405000654} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + 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!1 &680663832 GameObject: m_ObjectHideFlags: 0 @@ -22188,6 +22245,7 @@ GameObject: m_Component: - component: {fileID: 842314948} - component: {fileID: 842314949} + - component: {fileID: 842314950} m_Layer: 0 m_Name: promptmgr m_TagString: Untagged @@ -22223,7 +22281,21 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: PromptPrefab: {fileID: 0} - canvs: {fileID: 891877357} + canvs: {fileID: 914645746} +--- !u!114 &842314950 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 842314947} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4c3083e137957d04eb7671f96a491c1e, type: 3} + m_Name: + m_EditorClassIdentifier: + waterCountText: {fileID: 1331484648} + waterCount: 1000 --- !u!1 &846666786 GameObject: m_ObjectHideFlags: 0 @@ -27766,7 +27838,7 @@ GameObject: - component: {fileID: 1133337929} - component: {fileID: 1133337928} m_Layer: 5 - m_Name: Button (Legacy) + m_Name: LotteryBtn m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -30474,6 +30546,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1254123839} + - component: {fileID: 1254123840} m_Layer: 5 m_Name: Pet_HomePanel m_TagString: Untagged @@ -30502,6 +30575,20 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1254123840 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1254123838} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e34c7056091bf9c4d98d516cdc1edd33, type: 3} + m_Name: + m_EditorClassIdentifier: + LotteryPanel: {fileID: 405000654} + LotteryBtn: {fileID: 1133337928} --- !u!114 &1258540348 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 128555150, guid: 51fb8da1c1df4d14585a5f5bb1a088b7, type: 3} @@ -31975,6 +32062,17 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 2 m_VerticalFit: 2 +--- !u!114 &1331484648 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 1477323885177372599, guid: aa401e2ce6d8c5847a9a32a4ac92f0f0, type: 3} + m_PrefabInstance: {fileID: 509057630} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1336515156 GameObject: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/script/Panel/eco_tree/WaterPanel.cs b/meng_yao/Assets/script/Panel/eco_tree/WaterPanel.cs index c449d1964..06b11b55c 100644 --- a/meng_yao/Assets/script/Panel/eco_tree/WaterPanel.cs +++ b/meng_yao/Assets/script/Panel/eco_tree/WaterPanel.cs @@ -8,6 +8,7 @@ public class WaterPanel : MonoBehaviour public static WaterPanel instance; public Text waterCountText; public int waterCount = 1000; + // Start is called before the first frame update void Start() { @@ -23,16 +24,16 @@ public class WaterPanel : MonoBehaviour waterCount += wa; } //扣水 - else - { - int count = waterCount + wa; + else + { + int count = waterCount + wa;//-998 if (count < 0) { Debug.Log("水分不够,请充值!"); } else { - waterCount = count; + waterCount =count; } } waterCountText.text = waterCount.ToString() + "g"; @@ -43,6 +44,6 @@ public class WaterPanel : MonoBehaviour // Update is called once per frame void Update() { - + } } diff --git a/meng_yao/Assets/script/TanChuang/Lottery.cs b/meng_yao/Assets/script/TanChuang/Lottery.cs index 4c3f10ba0..d54c6f6a1 100644 --- a/meng_yao/Assets/script/TanChuang/Lottery.cs +++ b/meng_yao/Assets/script/TanChuang/Lottery.cs @@ -12,9 +12,16 @@ public class Lottery : MonoBehaviour } void LotteryClick() - { - - + { + if ((WaterPanel.instance.waterCount-999) > 0) + { + WaterPanel.instance.setWater(-999); + LotteryPanel.gameObject.SetActive(true); + } + else + { + Promptmgr.Instance.PromptBubble("水量不足,无法抽奖"); + } } // Update is called once per frame