Merge branch 'main' of http://shu.sheziwanglo.cn:3000/shurongsen/Cute_demon_attacks
This commit is contained in:
commit
95a9910e0c
379
meng_yao/Assets/Prefabs/ui/Signitem.prefab
Normal file
379
meng_yao/Assets/Prefabs/ui/Signitem.prefab
Normal file
@ -0,0 +1,379 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1210062692543431897
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1210062692543431898}
|
||||
- component: {fileID: 1210062692543431892}
|
||||
- component: {fileID: 1210062692543431899}
|
||||
m_Layer: 5
|
||||
m_Name: daynumber
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1210062692543431898
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062692543431897}
|
||||
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: 1210062693682274994}
|
||||
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: 22.8, y: -25.5}
|
||||
m_SizeDelta: {x: 36.3381, y: 34.3163}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1210062692543431892
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062692543431897}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1210062692543431899
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062692543431897}
|
||||
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.19607843, g: 0.19607843, b: 0.19607843, 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: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 24
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 1
|
||||
--- !u!1 &1210062692915169321
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1210062692915169322}
|
||||
- component: {fileID: 1210062692915169316}
|
||||
- component: {fileID: 1210062692915169323}
|
||||
m_Layer: 5
|
||||
m_Name: Finish
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1210062692915169322
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062692915169321}
|
||||
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: 1210062693682274994}
|
||||
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: 0}
|
||||
m_SizeDelta: {x: 48, y: 36}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1210062692915169316
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062692915169321}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1210062692915169323
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062692915169321}
|
||||
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: 6ca8b17a84806774a812ae5ee6cfa96e, 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 &1210062693682274993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1210062693682274994}
|
||||
- component: {fileID: 1210062693682274988}
|
||||
- component: {fileID: 1210062693682274995}
|
||||
- component: {fileID: 1210062693682274989}
|
||||
- component: {fileID: 6842635533237480691}
|
||||
m_Layer: 5
|
||||
m_Name: Signitem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1210062693682274994
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062693682274993}
|
||||
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: 1210062692543431898}
|
||||
- {fileID: 1210062693845086472}
|
||||
- {fileID: 1210062692915169322}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1210062693682274988
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062693682274993}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1210062693682274995
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062693682274993}
|
||||
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: ea8855cdf7a16994fa9c294493c097d9, 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 &1210062693682274989
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062693682274993}
|
||||
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: 21300000, guid: f54c4e2eaca884f43aa927bcfdbe6e5b, type: 3}
|
||||
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: 1210062693682274995}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &6842635533237480691
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062693682274993}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c7f209939df4afc4da384c4ef4f6b533, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
muskimg: {fileID: 1210062693845086473}
|
||||
Finshimg: {fileID: 1210062692915169323}
|
||||
dayNumber: {fileID: 1210062692543431899}
|
||||
daydata:
|
||||
signPanel: {fileID: 0}
|
||||
downBtn: {fileID: 0}
|
||||
pressedImage: {fileID: 21300000, guid: f54c4e2eaca884f43aa927bcfdbe6e5b, type: 3}
|
||||
morenImage: {fileID: 0}
|
||||
--- !u!1 &1210062693845086479
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1210062693845086472}
|
||||
- component: {fileID: 1210062693845086474}
|
||||
- component: {fileID: 1210062693845086473}
|
||||
m_Layer: 5
|
||||
m_Name: musk
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1210062693845086472
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062693845086479}
|
||||
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: 1210062693682274994}
|
||||
m_RootOrder: 1
|
||||
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: 130, y: 130}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1210062693845086474
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062693845086479}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1210062693845086473
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1210062693845086479}
|
||||
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: b6e583df3e0368c4fa2260cb3cfd30e7, 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
|
7
meng_yao/Assets/Prefabs/ui/Signitem.prefab.meta
Normal file
7
meng_yao/Assets/Prefabs/ui/Signitem.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9dbf38d299b742c41bf607563d3bf252
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1331,6 +1331,7 @@ MonoBehaviour:
|
||||
PanelList:
|
||||
- {fileID: 8646173536216845692, guid: 50faeaeff1e093d4cbfa173ee4bdc420, type: 3}
|
||||
canvse: {fileID: 0}
|
||||
_staminaBar: {fileID: 366819988}
|
||||
--- !u!1 &3011360592563063312
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5060,12 +5061,12 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: f2d69f2aa3f6373469eb2b4585d59920, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
filled: {fileID: 0}
|
||||
MaxNumberInt: 0
|
||||
numberInt: 0
|
||||
TextFilled: {fileID: 0}
|
||||
Timer: 0
|
||||
TextTime: {fileID: 0}
|
||||
filled: {fileID: 3011360593759972447}
|
||||
MaxNumberInt: 30
|
||||
numberInt: 20
|
||||
TextFilled: {fileID: 3011360593294462151}
|
||||
Timer: 180
|
||||
TextTime: {fileID: 3011360594502147457}
|
||||
--- !u!1 &3011360593356703323
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
Subproject commit b57312f05f927e5c61bec0e2c97847fac8116c4d
|
||||
Subproject commit 53e24b624e206126bddcc2e0d8399a442d741901
|
@ -77,7 +77,8 @@ public class Battle_Selection : BaseUI
|
||||
}
|
||||
|
||||
_staminaBar.NumberInt -= 5;
|
||||
// SceneManager.LoadScene(2);
|
||||
|
||||
SceneManager.LoadScene(2);
|
||||
});
|
||||
}
|
||||
|
||||
|
39
meng_yao/Assets/script/scene_Main/ui/SignItem.cs
Normal file
39
meng_yao/Assets/script/scene_Main/ui/SignItem.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class SignItem : MonoBehaviour
|
||||
{
|
||||
public Image muskimg;
|
||||
public Image Finshimg;
|
||||
public Text dayNumber;
|
||||
|
||||
[HideInInspector]
|
||||
public string daydata;
|
||||
|
||||
[HideInInspector]
|
||||
public SignPanel signPanel;
|
||||
|
||||
[HideInInspector]
|
||||
public Button downBtn;
|
||||
|
||||
public Sprite pressedImage;
|
||||
void Awake()
|
||||
{
|
||||
downBtn = GetComponent<Button>();
|
||||
downBtn.onClick.AddListener(DownClick);
|
||||
}
|
||||
|
||||
public void DownClick()
|
||||
{
|
||||
signPanel.HideImage();
|
||||
downBtn.image.sprite = pressedImage;
|
||||
signPanel.DayNow = daydata;
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
meng_yao/Assets/script/scene_Main/ui/SignItem.cs.meta
Normal file
11
meng_yao/Assets/script/scene_Main/ui/SignItem.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c7f209939df4afc4da384c4ef4f6b533
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
118
meng_yao/Assets/script/scene_Main/ui/SignPanel.cs
Normal file
118
meng_yao/Assets/script/scene_Main/ui/SignPanel.cs
Normal file
@ -0,0 +1,118 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class SignPanel : MonoBehaviour
|
||||
{
|
||||
public GameObject signitemprefab;
|
||||
public Transform Connact;
|
||||
public Button SignBtn;
|
||||
public Button ReSigningBtn;
|
||||
|
||||
[HideInInspector]
|
||||
public string DayNow;
|
||||
|
||||
public Sprite pressedImage;
|
||||
public Sprite morenImage;
|
||||
List<SignItem> itemlist = new List<SignItem>();
|
||||
List<Button> itemBtn = new List<Button>();
|
||||
async void Start()
|
||||
{
|
||||
SignBtn.onClick.AddListener(SignClick);
|
||||
ReSigningBtn.onClick.AddListener(ResigningClick);
|
||||
SigndataIndfo signdataIndfo = await Scene_main_jiekou.instance.SigndataInfos();
|
||||
for (int i = 1; i <= signdataIndfo.Data.sign_data.Length; i++)
|
||||
{
|
||||
GameObject obj = Instantiate(signitemprefab,Connact);
|
||||
itemlist.Add(obj.GetComponent<SignItem>());
|
||||
itemBtn.Add(obj.GetComponent<Button>());
|
||||
obj.GetComponent<SignItem>().signPanel = this;
|
||||
obj.GetComponent<SignItem>().daydata = signdataIndfo.Data.sign_data[i - 1].date;
|
||||
obj.GetComponent<SignItem>().dayNumber.text = i.ToString();
|
||||
|
||||
if (signdataIndfo.Data.days<i)
|
||||
{
|
||||
obj.GetComponent<SignItem>().downBtn.enabled = false;
|
||||
obj.GetComponent<SignItem>().muskimg.gameObject.SetActive(true);
|
||||
|
||||
}
|
||||
if (signdataIndfo.Data.sign_data[i - 1].status == 1)
|
||||
{
|
||||
obj.GetComponent<SignItem>().downBtn.enabled = false;
|
||||
obj.GetComponent<SignItem>().muskimg.gameObject.SetActive(true);
|
||||
obj.GetComponent<SignItem>().Finshimg.gameObject.SetActive(true);
|
||||
}
|
||||
if (signdataIndfo.Data.sign_data[i - 1].today == 1 && signdataIndfo.Data.sign_data[i - 1].status != 1)
|
||||
{
|
||||
Button btn = obj.GetComponent<Button>();
|
||||
btn.image.sprite = pressedImage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async void SignClick()
|
||||
{
|
||||
SignsumbitResponse response = await Scene_main_jiekou.instance.Signsumbits("");
|
||||
if (response.code == 200)
|
||||
{
|
||||
Init();
|
||||
Promptmgr.Instance.PromptBubble(response.message);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble(response.message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async void ResigningClick()
|
||||
{
|
||||
SignsumbitResponse response = await Scene_main_jiekou.instance.Signsumbits(DayNow);
|
||||
if (response.code == 200)
|
||||
{
|
||||
Init();
|
||||
Promptmgr.Instance.PromptBubble(response.message);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble(response.message);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async void Init()
|
||||
{
|
||||
SigndataIndfo signdataIndfo = await Scene_main_jiekou.instance.SigndataInfos();
|
||||
for (int i = 0; i < signdataIndfo.Data.sign_data.Length; i++)
|
||||
{
|
||||
if (signdataIndfo.Data.sign_data[i].status == 1)
|
||||
{
|
||||
itemlist[i].muskimg.gameObject.SetActive(true);
|
||||
itemlist[i].Finshimg.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void HideImage()
|
||||
{
|
||||
foreach (Button btn in itemBtn)
|
||||
{
|
||||
btn.image.sprite = morenImage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
meng_yao/Assets/script/scene_Main/ui/SignPanel.cs.meta
Normal file
11
meng_yao/Assets/script/scene_Main/ui/SignPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10eaa23ff40b18742b96bb9c3acb3a96
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -56,5 +56,5 @@ public class SignData
|
||||
public int today;
|
||||
public int status;
|
||||
public int type;
|
||||
public int reward;
|
||||
public float reward;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class signsumbit : MonoBehaviour
|
||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/user/sign/submit", "POST", JsonConvert.SerializeObject(body), CreateHeaders());
|
||||
Debug.Log("怬" + response);
|
||||
SignsumbitResponse signsumbitResponse = JsonConvert.DeserializeObject<SignsumbitResponse>(response);
|
||||
Debug.Log("=========" + signsumbitResponse.data.type);
|
||||
// Debug.Log("=========" + signsumbitResponse.data.type);
|
||||
return signsumbitResponse;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user