修改胜利条件,修改时间戳
This commit is contained in:
parent
9324f6ceab
commit
c4bddc8e21
@ -56,6 +56,8 @@ public static class DataManager
|
|||||||
public static void SetTime(string key)
|
public static void SetTime(string key)
|
||||||
{
|
{
|
||||||
var ts = GetTimeStamp(DateTime.Now);
|
var ts = GetTimeStamp(DateTime.Now);
|
||||||
|
Debug.LogError(ts);
|
||||||
|
Debug.LogError(ConvertIntDatetime(ts));
|
||||||
SaveValue("time" + key, ts);
|
SaveValue("time" + key, ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +88,7 @@ public static class DataManager
|
|||||||
//时间戳换算成时间
|
//时间戳换算成时间
|
||||||
private static DateTime ConvertIntDatetime(Int64 utc)
|
private static DateTime ConvertIntDatetime(Int64 utc)
|
||||||
{
|
{
|
||||||
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
|
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1,0,0,0));
|
||||||
startTime = startTime.AddSeconds(utc);
|
startTime = startTime.AddSeconds(utc);
|
||||||
return startTime;
|
return startTime;
|
||||||
}
|
}
|
||||||
|
@ -39,9 +39,9 @@ MonoBehaviour:
|
|||||||
m_PixelRect:
|
m_PixelRect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 1913
|
x: 1913
|
||||||
y: 24
|
y: 30
|
||||||
width: 1920
|
width: 1920
|
||||||
height: 1008
|
height: 1002
|
||||||
m_ShowMode: 0
|
m_ShowMode: 0
|
||||||
m_Title: Game
|
m_Title: Game
|
||||||
m_RootView: {fileID: 7}
|
m_RootView: {fileID: 7}
|
||||||
@ -67,7 +67,7 @@ MonoBehaviour:
|
|||||||
width: 1920
|
width: 1920
|
||||||
height: 989
|
height: 989
|
||||||
m_ShowMode: 4
|
m_ShowMode: 4
|
||||||
m_Title: Scene
|
m_Title: Hierarchy
|
||||||
m_RootView: {fileID: 12}
|
m_RootView: {fileID: 12}
|
||||||
m_MinSize: {x: 875, y: 300}
|
m_MinSize: {x: 875, y: 300}
|
||||||
m_MaxSize: {x: 10000, y: 10000}
|
m_MaxSize: {x: 10000, y: 10000}
|
||||||
@ -91,8 +91,8 @@ MonoBehaviour:
|
|||||||
y: 0
|
y: 0
|
||||||
width: 990
|
width: 990
|
||||||
height: 657
|
height: 657
|
||||||
m_MinSize: {x: 800, y: 600}
|
m_MinSize: {x: 800, y: 621}
|
||||||
m_MaxSize: {x: 4000, y: 4000}
|
m_MaxSize: {x: 4000, y: 4021}
|
||||||
m_ActualView: {fileID: 18}
|
m_ActualView: {fileID: 18}
|
||||||
m_Panes:
|
m_Panes:
|
||||||
- {fileID: 19}
|
- {fileID: 19}
|
||||||
@ -142,9 +142,9 @@ MonoBehaviour:
|
|||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: 1920
|
width: 1920
|
||||||
height: 1008
|
height: 1002
|
||||||
m_MinSize: {x: 100, y: 100}
|
m_MinSize: {x: 100, y: 121}
|
||||||
m_MaxSize: {x: 4000, y: 4000}
|
m_MaxSize: {x: 4000, y: 4021}
|
||||||
m_ActualView: {fileID: 26}
|
m_ActualView: {fileID: 26}
|
||||||
m_Panes:
|
m_Panes:
|
||||||
- {fileID: 26}
|
- {fileID: 26}
|
||||||
@ -169,7 +169,7 @@ MonoBehaviour:
|
|||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: 1920
|
width: 1920
|
||||||
height: 1008
|
height: 1002
|
||||||
m_MinSize: {x: 100, y: 121}
|
m_MinSize: {x: 100, y: 121}
|
||||||
m_MaxSize: {x: 4000, y: 4021}
|
m_MaxSize: {x: 4000, y: 4021}
|
||||||
vertical: 0
|
vertical: 0
|
||||||
@ -199,7 +199,7 @@ MonoBehaviour:
|
|||||||
m_MinSize: {x: 300, y: 100}
|
m_MinSize: {x: 300, y: 100}
|
||||||
m_MaxSize: {x: 24288, y: 16192}
|
m_MaxSize: {x: 24288, y: 16192}
|
||||||
vertical: 0
|
vertical: 0
|
||||||
controlID: 137
|
controlID: 140
|
||||||
draggingID: 0
|
draggingID: 0
|
||||||
--- !u!114 &9
|
--- !u!114 &9
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -375,7 +375,7 @@ MonoBehaviour:
|
|||||||
m_MinSize: {x: 200, y: 100}
|
m_MinSize: {x: 200, y: 100}
|
||||||
m_MaxSize: {x: 16192, y: 16192}
|
m_MaxSize: {x: 16192, y: 16192}
|
||||||
vertical: 1
|
vertical: 1
|
||||||
controlID: 71
|
controlID: 75
|
||||||
draggingID: 0
|
draggingID: 0
|
||||||
--- !u!114 &16
|
--- !u!114 &16
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -401,7 +401,7 @@ MonoBehaviour:
|
|||||||
m_MinSize: {x: 200, y: 50}
|
m_MinSize: {x: 200, y: 50}
|
||||||
m_MaxSize: {x: 16192, y: 8096}
|
m_MaxSize: {x: 16192, y: 8096}
|
||||||
vertical: 0
|
vertical: 0
|
||||||
controlID: 72
|
controlID: 76
|
||||||
draggingID: 0
|
draggingID: 0
|
||||||
--- !u!114 &17
|
--- !u!114 &17
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -422,8 +422,8 @@ MonoBehaviour:
|
|||||||
y: 0
|
y: 0
|
||||||
width: 1209
|
width: 1209
|
||||||
height: 511
|
height: 511
|
||||||
m_MinSize: {x: 200, y: 200}
|
m_MinSize: {x: 202, y: 221}
|
||||||
m_MaxSize: {x: 4000, y: 4000}
|
m_MaxSize: {x: 4002, y: 4021}
|
||||||
m_ActualView: {fileID: 24}
|
m_ActualView: {fileID: 24}
|
||||||
m_Panes:
|
m_Panes:
|
||||||
- {fileID: 24}
|
- {fileID: 24}
|
||||||
@ -604,24 +604,24 @@ MonoBehaviour:
|
|||||||
m_SkipHidden: 0
|
m_SkipHidden: 0
|
||||||
m_SearchArea: 1
|
m_SearchArea: 1
|
||||||
m_Folders:
|
m_Folders:
|
||||||
- Assets/Script/UI
|
- Assets/Pack/spine/Monster
|
||||||
m_Globs: []
|
m_Globs: []
|
||||||
m_OriginalText:
|
m_OriginalText:
|
||||||
m_ImportLogFlags: 0
|
m_ImportLogFlags: 0
|
||||||
m_FilterByTypeIntersection: 0
|
m_FilterByTypeIntersection: 0
|
||||||
m_ViewMode: 1
|
m_ViewMode: 1
|
||||||
m_StartGridSize: 96
|
m_StartGridSize: 16
|
||||||
m_LastFolders:
|
m_LastFolders:
|
||||||
- Assets/Script/UI
|
- Assets/Pack/spine/Monster
|
||||||
m_LastFoldersGridSize: 96
|
m_LastFoldersGridSize: 16
|
||||||
m_LastProjectPath: E:\UnityProject\Game\Blacksmith
|
m_LastProjectPath: E:\UnityProject\Game\Blacksmith
|
||||||
m_LockTracker:
|
m_LockTracker:
|
||||||
m_IsLocked: 0
|
m_IsLocked: 0
|
||||||
m_FolderTreeState:
|
m_FolderTreeState:
|
||||||
scrollPos: {x: 0, y: 105}
|
scrollPos: {x: 0, y: 164}
|
||||||
m_SelectedIDs: 3c840000
|
m_SelectedIDs: 40cd0100
|
||||||
m_LastClickedID: 33852
|
m_LastClickedID: 118080
|
||||||
m_ExpandedIDs: 00000000288400002a8400002c8400002e84000030840000328400003484000036840000388400003a8400003c8400003e8400004084000000ca9a3bffffff7f
|
m_ExpandedIDs: 00000000b4880000b6880000b8880000bc880000be880000c0880000c2880000c4880000c6880000c8880000ca880000cc880000c089000000ca9a3bffffff7f
|
||||||
m_RenameOverlay:
|
m_RenameOverlay:
|
||||||
m_UserAcceptedRename: 0
|
m_UserAcceptedRename: 0
|
||||||
m_Name:
|
m_Name:
|
||||||
@ -649,7 +649,7 @@ MonoBehaviour:
|
|||||||
scrollPos: {x: 0, y: 0}
|
scrollPos: {x: 0, y: 0}
|
||||||
m_SelectedIDs:
|
m_SelectedIDs:
|
||||||
m_LastClickedID: 0
|
m_LastClickedID: 0
|
||||||
m_ExpandedIDs: 00000000288400002a8400002c8400002e84000030840000328400003484000036840000388400003a8400003c8400003e84000040840000
|
m_ExpandedIDs: 00000000b4880000b6880000b8880000ba880000bc880000be880000c0880000c2880000c4880000c6880000c8880000ca880000cc880000
|
||||||
m_RenameOverlay:
|
m_RenameOverlay:
|
||||||
m_UserAcceptedRename: 0
|
m_UserAcceptedRename: 0
|
||||||
m_Name:
|
m_Name:
|
||||||
@ -676,7 +676,7 @@ MonoBehaviour:
|
|||||||
m_ListAreaState:
|
m_ListAreaState:
|
||||||
m_SelectedInstanceIDs:
|
m_SelectedInstanceIDs:
|
||||||
m_LastClickedInstanceID: 0
|
m_LastClickedInstanceID: 0
|
||||||
m_HadKeyboardFocusLastEvent: 0
|
m_HadKeyboardFocusLastEvent: 1
|
||||||
m_ExpandedInstanceIDs: c623000044860000228500003c0001002e000100be740000c4740000c2740000b4740000b2740000ba740000bc740000b0740000c0740000b6740000b87400009c7400008c740000867400009274000098740000967400009a74000090740000a07400008e740000847400009e740000000000004683000040830000388300005c830000aa780000d0690000e4690000f06a0000c06b00003a6a000070360500107a0000e27900009e6a0000267a0000387a00001e7a000082500200f0790000287a00007c7d00007aa100002a130100381301001a8300000c83000068f90200
|
m_ExpandedInstanceIDs: c623000044860000228500003c0001002e000100be740000c4740000c2740000b4740000b2740000ba740000bc740000b0740000c0740000b6740000b87400009c7400008c740000867400009274000098740000967400009a74000090740000a07400008e740000847400009e740000000000004683000040830000388300005c830000aa780000d0690000e4690000f06a0000c06b00003a6a000070360500107a0000e27900009e6a0000267a0000387a00001e7a000082500200f0790000287a00007c7d00007aa100002a130100381301001a8300000c83000068f90200
|
||||||
m_RenameOverlay:
|
m_RenameOverlay:
|
||||||
m_UserAcceptedRename: 0
|
m_UserAcceptedRename: 0
|
||||||
@ -693,7 +693,7 @@ MonoBehaviour:
|
|||||||
m_IsRenaming: 0
|
m_IsRenaming: 0
|
||||||
m_OriginalEventType: 11
|
m_OriginalEventType: 11
|
||||||
m_IsRenamingFilename: 1
|
m_IsRenamingFilename: 1
|
||||||
m_ClientGUIView: {fileID: 6}
|
m_ClientGUIView: {fileID: 11}
|
||||||
m_CreateAssetUtility:
|
m_CreateAssetUtility:
|
||||||
m_EndAction: {fileID: 0}
|
m_EndAction: {fileID: 0}
|
||||||
m_InstanceID: 0
|
m_InstanceID: 0
|
||||||
@ -702,7 +702,7 @@ MonoBehaviour:
|
|||||||
m_ResourceFile:
|
m_ResourceFile:
|
||||||
m_NewAssetIndexInList: -1
|
m_NewAssetIndexInList: -1
|
||||||
m_ScrollPosition: {x: 0, y: 0}
|
m_ScrollPosition: {x: 0, y: 0}
|
||||||
m_GridSize: 96
|
m_GridSize: 16
|
||||||
m_SkipHiddenPackages: 0
|
m_SkipHiddenPackages: 0
|
||||||
m_DirectoriesAreaWidth: 379
|
m_DirectoriesAreaWidth: 379
|
||||||
--- !u!114 &22
|
--- !u!114 &22
|
||||||
@ -742,7 +742,7 @@ MonoBehaviour:
|
|||||||
m_ObjectsLockedBeforeSerialization: []
|
m_ObjectsLockedBeforeSerialization: []
|
||||||
m_InstanceIDsLockedBeforeSerialization:
|
m_InstanceIDsLockedBeforeSerialization:
|
||||||
m_PreviewResizer:
|
m_PreviewResizer:
|
||||||
m_CachedPref: 165
|
m_CachedPref: 408
|
||||||
m_ControlHash: -371814159
|
m_ControlHash: -371814159
|
||||||
m_PrefName: Preview_InspectorPreview
|
m_PrefName: Preview_InspectorPreview
|
||||||
m_LastInspectedObjectInstanceID: -1
|
m_LastInspectedObjectInstanceID: -1
|
||||||
@ -788,24 +788,24 @@ MonoBehaviour:
|
|||||||
m_OverlaysVisible: 1
|
m_OverlaysVisible: 1
|
||||||
m_SceneHierarchy:
|
m_SceneHierarchy:
|
||||||
m_TreeViewState:
|
m_TreeViewState:
|
||||||
scrollPos: {x: 0, y: 32}
|
scrollPos: {x: 0, y: 0}
|
||||||
m_SelectedIDs: 02740000
|
m_SelectedIDs:
|
||||||
m_LastClickedID: 29698
|
m_LastClickedID: 0
|
||||||
m_ExpandedIDs: 8669fdff086afdffc48cfdffd28cfdffd48cfdffd0bafdffd4bafdffd6bafdff565bfeff405cfeff765cfeff845cfeff9e5cfeff6cf2fefff0f6fffffaf6ffff02f7ffff16fbffff9c7100009a720000c2720000127300008c7300000274000086740000c87400001c75000024750000707500008a750000c4750000de750000067600000c7c0000c07c0000067d0000c47d0000907e000098800000a2800000e4800000b6810000
|
m_ExpandedIDs: 1c8dffff748dffffda90ffff16fbfffff871000086740000ec7400001e75000088750000bc750000387600007477000098780000c8790000247b0000427b0000c07b00001c7c00003a7d00003c8100002a820000468500006a850000
|
||||||
m_RenameOverlay:
|
m_RenameOverlay:
|
||||||
m_UserAcceptedRename: 0
|
m_UserAcceptedRename: 0
|
||||||
m_Name:
|
m_Name: Spine GameObject (spine_104_01)
|
||||||
m_OriginalName:
|
m_OriginalName: Spine GameObject (spine_104_01)
|
||||||
m_EditFieldRect:
|
m_EditFieldRect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: 0
|
width: 0
|
||||||
height: 0
|
height: 0
|
||||||
m_UserData: 0
|
m_UserData: -32180
|
||||||
m_IsWaitingForDelay: 0
|
m_IsWaitingForDelay: 0
|
||||||
m_IsRenaming: 0
|
m_IsRenaming: 0
|
||||||
m_OriginalEventType: 11
|
m_OriginalEventType: 0
|
||||||
m_IsRenamingFilename: 0
|
m_IsRenamingFilename: 0
|
||||||
m_ClientGUIView: {fileID: 10}
|
m_ClientGUIView: {fileID: 10}
|
||||||
m_SearchString:
|
m_SearchString:
|
||||||
@ -1210,9 +1210,9 @@ MonoBehaviour:
|
|||||||
m_PlayAudio: 0
|
m_PlayAudio: 0
|
||||||
m_AudioPlay: 0
|
m_AudioPlay: 0
|
||||||
m_Position:
|
m_Position:
|
||||||
m_Target: {x: 804.1326, y: 1553.2505, z: -0.68685544}
|
m_Target: {x: 0.34727898, y: 0.0642358, z: -0.0056783454}
|
||||||
speed: 2
|
speed: 2
|
||||||
m_Value: {x: 819.44617, y: 1542.4159, z: -0.88478017}
|
m_Value: {x: 0.32195595, y: 0.06854, z: -0.0053454875}
|
||||||
m_RenderMode: 0
|
m_RenderMode: 0
|
||||||
m_CameraMode:
|
m_CameraMode:
|
||||||
drawMode: 0
|
drawMode: 0
|
||||||
@ -1262,9 +1262,9 @@ MonoBehaviour:
|
|||||||
speed: 2
|
speed: 2
|
||||||
m_Value: {x: 0, y: 0, z: 0, w: 1}
|
m_Value: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_Size:
|
m_Size:
|
||||||
m_Target: 420.03943
|
m_Target: 0.7729703
|
||||||
speed: 2
|
speed: 2
|
||||||
m_Value: 439.83185
|
m_Value: 0.7396845
|
||||||
m_Ortho:
|
m_Ortho:
|
||||||
m_Target: 1
|
m_Target: 1
|
||||||
speed: 2
|
speed: 2
|
||||||
@ -1344,9 +1344,9 @@ MonoBehaviour:
|
|||||||
m_Pos:
|
m_Pos:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 1913
|
x: 1913
|
||||||
y: 24
|
y: 30
|
||||||
width: 1920
|
width: 1920
|
||||||
height: 987
|
height: 981
|
||||||
m_SerializedDataModeController:
|
m_SerializedDataModeController:
|
||||||
m_DataMode: 0
|
m_DataMode: 0
|
||||||
m_PreferredDataMode: 0
|
m_PreferredDataMode: 0
|
||||||
@ -1402,22 +1402,22 @@ MonoBehaviour:
|
|||||||
x: 0
|
x: 0
|
||||||
y: 21
|
y: 21
|
||||||
width: 1920
|
width: 1920
|
||||||
height: 966
|
height: 960
|
||||||
m_Scale: {x: 0.503125, y: 0.503125}
|
m_Scale: {x: 0.5, y: 0.5}
|
||||||
m_Translation: {x: 960, y: 483}
|
m_Translation: {x: 960, y: 480}
|
||||||
m_MarginLeft: 0
|
m_MarginLeft: 0
|
||||||
m_MarginRight: 0
|
m_MarginRight: 0
|
||||||
m_MarginTop: 0
|
m_MarginTop: 0
|
||||||
m_MarginBottom: 0
|
m_MarginBottom: 0
|
||||||
m_LastShownAreaInsideMargins:
|
m_LastShownAreaInsideMargins:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: -1908.0745
|
x: -1920
|
||||||
y: -960
|
y: -960
|
||||||
width: 3816.149
|
width: 3840
|
||||||
height: 1920
|
height: 1920
|
||||||
m_MinimalGUI: 1
|
m_MinimalGUI: 1
|
||||||
m_defaultScale: 0.503125
|
m_defaultScale: 0.5
|
||||||
m_LastWindowPixelSize: {x: 1920, y: 987}
|
m_LastWindowPixelSize: {x: 1920, y: 981}
|
||||||
m_ClearInEditMode: 1
|
m_ClearInEditMode: 1
|
||||||
m_NoCameraWarning: 1
|
m_NoCameraWarning: 1
|
||||||
m_LowResolutionForAspectRatios: 01000001000000000000
|
m_LowResolutionForAspectRatios: 01000001000000000000
|
||||||
|
@ -44,7 +44,7 @@ MonoBehaviour:
|
|||||||
a: tt2f5a59e7b06fb35a07
|
a: tt2f5a59e7b06fb35a07
|
||||||
version:
|
version:
|
||||||
autoVersion: 0
|
autoVersion: 0
|
||||||
b: E:\Project\apk\BoxDY\webgl_package-20241216_174547.zip
|
b: E:\Project\apk\BoxDY\webgl_package-20241216_203859.zip
|
||||||
c: 0
|
c: 0
|
||||||
d: 0
|
d: 0
|
||||||
e: 0
|
e: 0
|
||||||
|
@ -152,7 +152,7 @@ public static class DataManager
|
|||||||
//时间戳换算成时间
|
//时间戳换算成时间
|
||||||
private static DateTime ConvertIntDatetime(Int64 utc)
|
private static DateTime ConvertIntDatetime(Int64 utc)
|
||||||
{
|
{
|
||||||
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
|
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1,0,0,0));
|
||||||
startTime = startTime.AddSeconds(utc);
|
startTime = startTime.AddSeconds(utc);
|
||||||
return startTime;
|
return startTime;
|
||||||
}
|
}
|
||||||
@ -200,14 +200,14 @@ public static class DataManager
|
|||||||
|
|
||||||
public static int GetMinute(string key)
|
public static int GetMinute(string key)
|
||||||
{
|
{
|
||||||
TimeSpan timeSpan = new TimeSpan(DateTimeOffset.UtcNow.Ticks - GetTime(key).Ticks);
|
TimeSpan timeSpan = new TimeSpan(DateTimeOffset.Now.Ticks - GetTime(key).Ticks);
|
||||||
return timeSpan.Minutes;
|
return (int)timeSpan.TotalMinutes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int GetHours(string key)
|
public static int GetHours(string key)
|
||||||
{
|
{
|
||||||
//计算两个时间间隔
|
//计算两个时间间隔
|
||||||
TimeSpan timeSpan = new TimeSpan(DateTimeOffset.UtcNow.Ticks - GetTime(key).Ticks);
|
TimeSpan timeSpan = new TimeSpan(DateTimeOffset.Now.Ticks - GetTime(key).Ticks);
|
||||||
return timeSpan.Hours;
|
return timeSpan.Hours;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,10 +228,21 @@ public static class DataManager
|
|||||||
var p = (float)GetMinute("physical")/10;
|
var p = (float)GetMinute("physical")/10;
|
||||||
if (p>1)
|
if (p>1)
|
||||||
{
|
{
|
||||||
|
NewPhysicalEvent();
|
||||||
SetPhysical((int)p);
|
SetPhysical((int)p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static void RemovePhysical(int num)
|
||||||
|
{
|
||||||
|
NewPhysicalEvent();
|
||||||
|
var p = GetInt("timePhysical") - num;
|
||||||
|
SetInt("timePhysical", p);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void NewPhysicalEvent()
|
||||||
|
{
|
||||||
|
SetTime("physical");
|
||||||
|
}
|
||||||
public static void SetPhysical(int i)
|
public static void SetPhysical(int i)
|
||||||
{
|
{
|
||||||
var num = GetInt("timePhysical") + i;
|
var num = GetInt("timePhysical") + i;
|
||||||
@ -244,7 +255,7 @@ public static class DataManager
|
|||||||
}
|
}
|
||||||
public static void SetTime(string key)
|
public static void SetTime(string key)
|
||||||
{
|
{
|
||||||
var ts = GetTimeStamp(DateTime.Now);
|
var ts = GetTimeStamp(DateTime.Now.ToUniversalTime());
|
||||||
SetInt("time" + key, ts);
|
SetInt("time" + key, ts);
|
||||||
}
|
}
|
||||||
//获取时间戳
|
//获取时间戳
|
||||||
|
@ -201,6 +201,7 @@ public class GameManager : MonoBehaviour
|
|||||||
start = false;
|
start = false;
|
||||||
MapManager.ins.PlayBoxClose();
|
MapManager.ins.PlayBoxClose();
|
||||||
MainPanel.ins.StartTourPanel();
|
MainPanel.ins.StartTourPanel();
|
||||||
|
nowTime = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -223,7 +224,15 @@ public class GameManager : MonoBehaviour
|
|||||||
}
|
}
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
nowTime += Time.deltaTime;
|
if (start)
|
||||||
|
{
|
||||||
|
nowTime += Time.deltaTime;
|
||||||
|
if (nowTime>=300)
|
||||||
|
{
|
||||||
|
index=0;
|
||||||
|
PackEvent();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (Input.GetMouseButtonDown(0))
|
if (Input.GetMouseButtonDown(0))
|
||||||
{
|
{
|
||||||
oldvec = Input.mousePosition;
|
oldvec = Input.mousePosition;
|
||||||
|
@ -40,6 +40,10 @@ public class SoundSystem : MonoBehaviour
|
|||||||
}
|
}
|
||||||
public void MainAudio()
|
public void MainAudio()
|
||||||
{
|
{
|
||||||
|
if (_audioSource.clip==mainSound)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
_audioSource.clip = mainSound;
|
_audioSource.clip = mainSound;
|
||||||
if (!audioBo)
|
if (!audioBo)
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,7 @@ public class LevelPanel : MonoBehaviour
|
|||||||
[SerializeField] private Transform spiriEnd;
|
[SerializeField] private Transform spiriEnd;
|
||||||
[SerializeField] private Transform spiriAni;
|
[SerializeField] private Transform spiriAni;
|
||||||
[SerializeField] private Slider _slider;
|
[SerializeField] private Slider _slider;
|
||||||
|
[SerializeField] private TextMeshProUGUI physical;
|
||||||
private int aniIndex;
|
private int aniIndex;
|
||||||
|
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
@ -40,6 +41,7 @@ public class LevelPanel : MonoBehaviour
|
|||||||
upButton.onClick.AddListener(UpData);
|
upButton.onClick.AddListener(UpData);
|
||||||
dowButton.onClick.AddListener(DownData);
|
dowButton.onClick.AddListener(DownData);
|
||||||
homeButton.onClick.AddListener(HomeEvent);
|
homeButton.onClick.AddListener(HomeEvent);
|
||||||
|
DataManager.AddPhysical();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +75,7 @@ public class LevelPanel : MonoBehaviour
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MainPanelOpen()
|
private void MainPanelOpen()
|
||||||
@ -232,29 +235,33 @@ public class LevelPanel : MonoBehaviour
|
|||||||
|
|
||||||
public void StartGame()
|
public void StartGame()
|
||||||
{
|
{
|
||||||
wait.SetActive(true);
|
if (DataManager.GetPhysical()>=5)
|
||||||
spiriAni.position = spiriStart.position;
|
|
||||||
spiriAni.DOMove(spiriEnd.position, 2f).OnComplete(() =>
|
|
||||||
{
|
{
|
||||||
aniIndex++;
|
DataManager.RemovePhysical(5);
|
||||||
if (aniIndex>=2)
|
wait.SetActive(true);
|
||||||
|
spiriAni.position = spiriStart.position;
|
||||||
|
spiriAni.DOMove(spiriEnd.position, 2f).OnComplete(() =>
|
||||||
{
|
{
|
||||||
MainPanel.ins.StartPanelEvent();
|
aniIndex++;
|
||||||
GameManager.ins.soundSystem.EventAudio();
|
if (aniIndex>=2)
|
||||||
wait.SetActive(false);
|
{
|
||||||
}
|
MainPanel.ins.StartPanelEvent();
|
||||||
});
|
GameManager.ins.soundSystem.EventAudio();
|
||||||
DataManager.chapter = chapterId;
|
wait.SetActive(false);
|
||||||
GameManager.ins.ResetLevel(levelID, () =>
|
}
|
||||||
{
|
});
|
||||||
aniIndex++;
|
DataManager.chapter = chapterId;
|
||||||
if (aniIndex>=2)
|
GameManager.ins.ResetLevel(levelID, () =>
|
||||||
{
|
{
|
||||||
MainPanel.ins.StartPanelEvent();
|
aniIndex++;
|
||||||
GameManager.ins.soundSystem.EventAudio();
|
if (aniIndex>=2)
|
||||||
wait.SetActive(false);
|
{
|
||||||
}
|
MainPanel.ins.StartPanelEvent();
|
||||||
});
|
GameManager.ins.soundSystem.EventAudio();
|
||||||
|
wait.SetActive(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
@ -265,6 +272,6 @@ public class LevelPanel : MonoBehaviour
|
|||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
physical.text = DataManager.GetPhysical().ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -416,12 +416,28 @@ public class TourPanel : MonoBehaviour
|
|||||||
}
|
}
|
||||||
if (nowTime>moveTime)
|
if (nowTime>moveTime)
|
||||||
{
|
{
|
||||||
DataManager.SetPointsData(GameManager.ins.level,(int)pointsNow);
|
if (nowLenght>targtsLanght)
|
||||||
TaskEvent(1);
|
{
|
||||||
BoxDebug.Log("时间用完旅行结束");
|
DataManager.SetPointsData(GameManager.ins.level,(int)pointsNow);
|
||||||
playing = false;
|
TaskEvent(1);
|
||||||
GameManager.ins.soundSystem.LoseAudio();
|
TaskEvent(3);
|
||||||
MainPanel.ins.Lose();
|
TaskEvent(6);
|
||||||
|
BoxDebug.Log("到达终点");
|
||||||
|
nowLenght = MaxLengh();
|
||||||
|
DataManager.SetLevelOpen(GameManager.ins.level,true);
|
||||||
|
MainPanel.ins.Win();
|
||||||
|
GameManager.ins.soundSystem.WinAudio();
|
||||||
|
playing = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataManager.SetPointsData(GameManager.ins.level,(int)pointsNow);
|
||||||
|
TaskEvent(1);
|
||||||
|
BoxDebug.Log("时间用完旅行结束");
|
||||||
|
playing = false;
|
||||||
|
GameManager.ins.soundSystem.LoseAudio();
|
||||||
|
MainPanel.ins.Lose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (nowLenght>=lenght)
|
if (nowLenght>=lenght)
|
||||||
{
|
{
|
||||||
|
1279
box1/UserSettings/Layouts/default-2022.dwlt
Normal file
1279
box1/UserSettings/Layouts/default-2022.dwlt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user