Merge branch 'main' into TT
This commit is contained in:
commit
a032170217
@ -56,6 +56,8 @@ public static class DataManager
|
||||
public static void SetTime(string key)
|
||||
{
|
||||
var ts = GetTimeStamp(DateTime.Now);
|
||||
Debug.LogError(ts);
|
||||
Debug.LogError(ConvertIntDatetime(ts));
|
||||
SaveValue("time" + key, ts);
|
||||
}
|
||||
|
||||
@ -86,7 +88,7 @@ public static class DataManager
|
||||
//时间戳换算成时间
|
||||
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);
|
||||
return startTime;
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ MonoBehaviour:
|
||||
m_PixelRect:
|
||||
serializedVersion: 2
|
||||
x: 1913
|
||||
y: 24
|
||||
y: 30
|
||||
width: 1920
|
||||
height: 1008
|
||||
height: 1002
|
||||
m_ShowMode: 0
|
||||
m_Title: Game
|
||||
m_RootView: {fileID: 7}
|
||||
@ -67,7 +67,7 @@ MonoBehaviour:
|
||||
width: 1920
|
||||
height: 989
|
||||
m_ShowMode: 4
|
||||
m_Title: Scene
|
||||
m_Title: Hierarchy
|
||||
m_RootView: {fileID: 12}
|
||||
m_MinSize: {x: 875, y: 300}
|
||||
m_MaxSize: {x: 10000, y: 10000}
|
||||
@ -91,8 +91,8 @@ MonoBehaviour:
|
||||
y: 0
|
||||
width: 990
|
||||
height: 657
|
||||
m_MinSize: {x: 800, y: 600}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_MinSize: {x: 800, y: 621}
|
||||
m_MaxSize: {x: 4000, y: 4021}
|
||||
m_ActualView: {fileID: 18}
|
||||
m_Panes:
|
||||
- {fileID: 19}
|
||||
@ -142,9 +142,9 @@ MonoBehaviour:
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1920
|
||||
height: 1008
|
||||
m_MinSize: {x: 100, y: 100}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
height: 1002
|
||||
m_MinSize: {x: 100, y: 121}
|
||||
m_MaxSize: {x: 4000, y: 4021}
|
||||
m_ActualView: {fileID: 26}
|
||||
m_Panes:
|
||||
- {fileID: 26}
|
||||
@ -169,7 +169,7 @@ MonoBehaviour:
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1920
|
||||
height: 1008
|
||||
height: 1002
|
||||
m_MinSize: {x: 100, y: 121}
|
||||
m_MaxSize: {x: 4000, y: 4021}
|
||||
vertical: 0
|
||||
@ -199,7 +199,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 300, y: 100}
|
||||
m_MaxSize: {x: 24288, y: 16192}
|
||||
vertical: 0
|
||||
controlID: 137
|
||||
controlID: 140
|
||||
draggingID: 0
|
||||
--- !u!114 &9
|
||||
MonoBehaviour:
|
||||
@ -375,7 +375,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 200, y: 100}
|
||||
m_MaxSize: {x: 16192, y: 16192}
|
||||
vertical: 1
|
||||
controlID: 71
|
||||
controlID: 75
|
||||
draggingID: 0
|
||||
--- !u!114 &16
|
||||
MonoBehaviour:
|
||||
@ -401,7 +401,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 200, y: 50}
|
||||
m_MaxSize: {x: 16192, y: 8096}
|
||||
vertical: 0
|
||||
controlID: 72
|
||||
controlID: 76
|
||||
draggingID: 0
|
||||
--- !u!114 &17
|
||||
MonoBehaviour:
|
||||
@ -422,8 +422,8 @@ MonoBehaviour:
|
||||
y: 0
|
||||
width: 1209
|
||||
height: 511
|
||||
m_MinSize: {x: 200, y: 200}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_MinSize: {x: 202, y: 221}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 24}
|
||||
m_Panes:
|
||||
- {fileID: 24}
|
||||
@ -604,24 +604,24 @@ MonoBehaviour:
|
||||
m_SkipHidden: 0
|
||||
m_SearchArea: 1
|
||||
m_Folders:
|
||||
- Assets/Script/UI
|
||||
- Assets/Pack/spine/Monster
|
||||
m_Globs: []
|
||||
m_OriginalText:
|
||||
m_ImportLogFlags: 0
|
||||
m_FilterByTypeIntersection: 0
|
||||
m_ViewMode: 1
|
||||
m_StartGridSize: 96
|
||||
m_StartGridSize: 16
|
||||
m_LastFolders:
|
||||
- Assets/Script/UI
|
||||
m_LastFoldersGridSize: 96
|
||||
- Assets/Pack/spine/Monster
|
||||
m_LastFoldersGridSize: 16
|
||||
m_LastProjectPath: E:\UnityProject\Game\Blacksmith
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 105}
|
||||
m_SelectedIDs: 3c840000
|
||||
m_LastClickedID: 33852
|
||||
m_ExpandedIDs: 00000000288400002a8400002c8400002e84000030840000328400003484000036840000388400003a8400003c8400003e8400004084000000ca9a3bffffff7f
|
||||
scrollPos: {x: 0, y: 164}
|
||||
m_SelectedIDs: 40cd0100
|
||||
m_LastClickedID: 118080
|
||||
m_ExpandedIDs: 00000000b4880000b6880000b8880000bc880000be880000c0880000c2880000c4880000c6880000c8880000ca880000cc880000c089000000ca9a3bffffff7f
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -649,7 +649,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 00000000288400002a8400002c8400002e84000030840000328400003484000036840000388400003a8400003c8400003e84000040840000
|
||||
m_ExpandedIDs: 00000000b4880000b6880000b8880000ba880000bc880000be880000c0880000c2880000c4880000c6880000c8880000ca880000cc880000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -676,7 +676,7 @@ MonoBehaviour:
|
||||
m_ListAreaState:
|
||||
m_SelectedInstanceIDs:
|
||||
m_LastClickedInstanceID: 0
|
||||
m_HadKeyboardFocusLastEvent: 0
|
||||
m_HadKeyboardFocusLastEvent: 1
|
||||
m_ExpandedInstanceIDs: c623000044860000228500003c0001002e000100be740000c4740000c2740000b4740000b2740000ba740000bc740000b0740000c0740000b6740000b87400009c7400008c740000867400009274000098740000967400009a74000090740000a07400008e740000847400009e740000000000004683000040830000388300005c830000aa780000d0690000e4690000f06a0000c06b00003a6a000070360500107a0000e27900009e6a0000267a0000387a00001e7a000082500200f0790000287a00007c7d00007aa100002a130100381301001a8300000c83000068f90200
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
@ -693,7 +693,7 @@ MonoBehaviour:
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 1
|
||||
m_ClientGUIView: {fileID: 6}
|
||||
m_ClientGUIView: {fileID: 11}
|
||||
m_CreateAssetUtility:
|
||||
m_EndAction: {fileID: 0}
|
||||
m_InstanceID: 0
|
||||
@ -702,7 +702,7 @@ MonoBehaviour:
|
||||
m_ResourceFile:
|
||||
m_NewAssetIndexInList: -1
|
||||
m_ScrollPosition: {x: 0, y: 0}
|
||||
m_GridSize: 96
|
||||
m_GridSize: 16
|
||||
m_SkipHiddenPackages: 0
|
||||
m_DirectoriesAreaWidth: 379
|
||||
--- !u!114 &22
|
||||
@ -742,7 +742,7 @@ MonoBehaviour:
|
||||
m_ObjectsLockedBeforeSerialization: []
|
||||
m_InstanceIDsLockedBeforeSerialization:
|
||||
m_PreviewResizer:
|
||||
m_CachedPref: 165
|
||||
m_CachedPref: 408
|
||||
m_ControlHash: -371814159
|
||||
m_PrefName: Preview_InspectorPreview
|
||||
m_LastInspectedObjectInstanceID: -1
|
||||
@ -788,24 +788,24 @@ MonoBehaviour:
|
||||
m_OverlaysVisible: 1
|
||||
m_SceneHierarchy:
|
||||
m_TreeViewState:
|
||||
scrollPos: {x: 0, y: 32}
|
||||
m_SelectedIDs: 02740000
|
||||
m_LastClickedID: 29698
|
||||
m_ExpandedIDs: 8669fdff086afdffc48cfdffd28cfdffd48cfdffd0bafdffd4bafdffd6bafdff565bfeff405cfeff765cfeff845cfeff9e5cfeff6cf2fefff0f6fffffaf6ffff02f7ffff16fbffff9c7100009a720000c2720000127300008c7300000274000086740000c87400001c75000024750000707500008a750000c4750000de750000067600000c7c0000c07c0000067d0000c47d0000907e000098800000a2800000e4800000b6810000
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 1c8dffff748dffffda90ffff16fbfffff871000086740000ec7400001e75000088750000bc750000387600007477000098780000c8790000247b0000427b0000c07b00001c7c00003a7d00003c8100002a820000468500006a850000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
m_OriginalName:
|
||||
m_Name: Spine GameObject (spine_104_01)
|
||||
m_OriginalName: Spine GameObject (spine_104_01)
|
||||
m_EditFieldRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0
|
||||
height: 0
|
||||
m_UserData: 0
|
||||
m_UserData: -32180
|
||||
m_IsWaitingForDelay: 0
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_OriginalEventType: 0
|
||||
m_IsRenamingFilename: 0
|
||||
m_ClientGUIView: {fileID: 10}
|
||||
m_SearchString:
|
||||
@ -1210,9 +1210,9 @@ MonoBehaviour:
|
||||
m_PlayAudio: 0
|
||||
m_AudioPlay: 0
|
||||
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
|
||||
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_CameraMode:
|
||||
drawMode: 0
|
||||
@ -1262,9 +1262,9 @@ MonoBehaviour:
|
||||
speed: 2
|
||||
m_Value: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_Size:
|
||||
m_Target: 420.03943
|
||||
m_Target: 0.7729703
|
||||
speed: 2
|
||||
m_Value: 439.83185
|
||||
m_Value: 0.7396845
|
||||
m_Ortho:
|
||||
m_Target: 1
|
||||
speed: 2
|
||||
@ -1344,9 +1344,9 @@ MonoBehaviour:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 1913
|
||||
y: 24
|
||||
y: 30
|
||||
width: 1920
|
||||
height: 987
|
||||
height: 981
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -1402,22 +1402,22 @@ MonoBehaviour:
|
||||
x: 0
|
||||
y: 21
|
||||
width: 1920
|
||||
height: 966
|
||||
m_Scale: {x: 0.503125, y: 0.503125}
|
||||
m_Translation: {x: 960, y: 483}
|
||||
height: 960
|
||||
m_Scale: {x: 0.5, y: 0.5}
|
||||
m_Translation: {x: 960, y: 480}
|
||||
m_MarginLeft: 0
|
||||
m_MarginRight: 0
|
||||
m_MarginTop: 0
|
||||
m_MarginBottom: 0
|
||||
m_LastShownAreaInsideMargins:
|
||||
serializedVersion: 2
|
||||
x: -1908.0745
|
||||
x: -1920
|
||||
y: -960
|
||||
width: 3816.149
|
||||
width: 3840
|
||||
height: 1920
|
||||
m_MinimalGUI: 1
|
||||
m_defaultScale: 0.503125
|
||||
m_LastWindowPixelSize: {x: 1920, y: 987}
|
||||
m_defaultScale: 0.5
|
||||
m_LastWindowPixelSize: {x: 1920, y: 981}
|
||||
m_ClearInEditMode: 1
|
||||
m_NoCameraWarning: 1
|
||||
m_LowResolutionForAspectRatios: 01000001000000000000
|
||||
|
@ -44,7 +44,7 @@ MonoBehaviour:
|
||||
a: tt2f5a59e7b06fb35a07
|
||||
version:
|
||||
autoVersion: 0
|
||||
b: E:\Project\apk\BoxDY\webgl_package-20241216_174547.zip
|
||||
b: E:\Project\apk\BoxDY\webgl_package-20241216_203859.zip
|
||||
c: 0
|
||||
d: 0
|
||||
e: 0
|
||||
|
@ -153,7 +153,7 @@ public static class DataManager
|
||||
//时间戳换算成时间
|
||||
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);
|
||||
return startTime;
|
||||
}
|
||||
@ -201,14 +201,14 @@ public static class DataManager
|
||||
|
||||
public static int GetMinute(string key)
|
||||
{
|
||||
TimeSpan timeSpan = new TimeSpan(DateTimeOffset.UtcNow.Ticks - GetTime(key).Ticks);
|
||||
return timeSpan.Minutes;
|
||||
TimeSpan timeSpan = new TimeSpan(DateTimeOffset.Now.Ticks - GetTime(key).Ticks);
|
||||
return (int)timeSpan.TotalMinutes;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -229,10 +229,21 @@ public static class DataManager
|
||||
var p = (float)GetMinute("physical")/10;
|
||||
if (p>1)
|
||||
{
|
||||
NewPhysicalEvent();
|
||||
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)
|
||||
{
|
||||
var num = GetInt("timePhysical") + i;
|
||||
@ -245,7 +256,7 @@ public static class DataManager
|
||||
}
|
||||
public static void SetTime(string key)
|
||||
{
|
||||
var ts = GetTimeStamp(DateTime.Now);
|
||||
var ts = GetTimeStamp(DateTime.Now.ToUniversalTime());
|
||||
SetInt("time" + key, ts);
|
||||
}
|
||||
//获取时间戳
|
||||
|
@ -201,6 +201,7 @@ public class GameManager : MonoBehaviour
|
||||
start = false;
|
||||
MapManager.ins.PlayBoxClose();
|
||||
MainPanel.ins.StartTourPanel();
|
||||
nowTime = 0;
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -222,8 +223,16 @@ public class GameManager : MonoBehaviour
|
||||
MainPanel.ins.ResetPropattributes();
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (start)
|
||||
{
|
||||
nowTime += Time.deltaTime;
|
||||
if (nowTime>=300)
|
||||
{
|
||||
index=0;
|
||||
PackEvent();
|
||||
}
|
||||
}
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
oldvec = Input.mousePosition;
|
||||
|
@ -40,6 +40,10 @@ public class SoundSystem : MonoBehaviour
|
||||
}
|
||||
public void MainAudio()
|
||||
{
|
||||
if (_audioSource.clip==mainSound)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_audioSource.clip = mainSound;
|
||||
if (!audioBo)
|
||||
{
|
||||
|
@ -32,6 +32,7 @@ public class LevelPanel : MonoBehaviour
|
||||
[SerializeField] private Transform spiriEnd;
|
||||
[SerializeField] private Transform spiriAni;
|
||||
[SerializeField] private Slider _slider;
|
||||
[SerializeField] private TextMeshProUGUI physical;
|
||||
private int aniIndex;
|
||||
|
||||
private void OnEnable()
|
||||
@ -40,6 +41,7 @@ public class LevelPanel : MonoBehaviour
|
||||
upButton.onClick.AddListener(UpData);
|
||||
dowButton.onClick.AddListener(DownData);
|
||||
homeButton.onClick.AddListener(HomeEvent);
|
||||
DataManager.AddPhysical();
|
||||
|
||||
}
|
||||
|
||||
@ -73,6 +75,7 @@ public class LevelPanel : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void MainPanelOpen()
|
||||
@ -232,6 +235,9 @@ public class LevelPanel : MonoBehaviour
|
||||
|
||||
public void StartGame()
|
||||
{
|
||||
if (DataManager.GetPhysical()>=5)
|
||||
{
|
||||
DataManager.RemovePhysical(5);
|
||||
wait.SetActive(true);
|
||||
spiriAni.position = spiriStart.position;
|
||||
spiriAni.DOMove(spiriEnd.position, 2f).OnComplete(() =>
|
||||
@ -256,6 +262,7 @@ public class LevelPanel : MonoBehaviour
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -265,6 +272,6 @@ public class LevelPanel : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
physical.text = DataManager.GetPhysical().ToString();
|
||||
}
|
||||
}
|
||||
|
@ -415,6 +415,21 @@ public class TourPanel : MonoBehaviour
|
||||
TaskEvent(5);
|
||||
}
|
||||
if (nowTime>moveTime)
|
||||
{
|
||||
if (nowLenght>targtsLanght)
|
||||
{
|
||||
DataManager.SetPointsData(GameManager.ins.level,(int)pointsNow);
|
||||
TaskEvent(1);
|
||||
TaskEvent(3);
|
||||
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);
|
||||
@ -423,6 +438,7 @@ public class TourPanel : MonoBehaviour
|
||||
GameManager.ins.soundSystem.LoseAudio();
|
||||
MainPanel.ins.Lose();
|
||||
}
|
||||
}
|
||||
if (nowLenght>=lenght)
|
||||
{
|
||||
DataManager.SetPointsData(GameManager.ins.level,(int)pointsNow);
|
||||
|
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