石头完善
This commit is contained in:
@@ -207,6 +207,10 @@ MonoBehaviour:
|
||||
m_Key: setting_textSpeed_slow
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 105795024870969344
|
||||
m_Key: info_saving
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
m_KeyGenerator:
|
||||
|
||||
@@ -224,6 +224,10 @@ MonoBehaviour:
|
||||
m_Localized: SLOW
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 105795024870969344
|
||||
m_Localized: "Saving\u2026"
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
|
||||
@@ -213,6 +213,10 @@ MonoBehaviour:
|
||||
m_Localized: "\u6162\u901F"
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 105795024870969344
|
||||
m_Localized: "\u4FDD\u5B58\u4E2D\u2026\u2026"
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
|
||||
@@ -7075,7 +7075,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &398371925
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -12536,7 +12536,7 @@ RectTransform:
|
||||
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_AnchoredPosition: {x: 865, y: -389}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1001 &759307075
|
||||
@@ -15147,6 +15147,7 @@ RectTransform:
|
||||
- {fileID: 398371925}
|
||||
- {fileID: 749156595}
|
||||
- {fileID: 1986521822}
|
||||
- {fileID: 2045712318}
|
||||
m_Father: {fileID: 2091451641}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -15177,6 +15178,7 @@ MonoBehaviour:
|
||||
demoTimer: {fileID: 398371926}
|
||||
loading: {fileID: 749156594}
|
||||
variableBar: {fileID: 1986521826}
|
||||
saveLoading: {fileID: 2045712317}
|
||||
--- !u!1 &927888433
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -29319,6 +29321,181 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2038437601}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &2045712317
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2045712318}
|
||||
- component: {fileID: 2045712320}
|
||||
- component: {fileID: 2045712319}
|
||||
- component: {fileID: 2045712321}
|
||||
m_Layer: 5
|
||||
m_Name: Saving Sign
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &2045712318
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2045712317}
|
||||
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: 923998313}
|
||||
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: 850, y: -475.2}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2045712319
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2045712317}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: f242fb3dde1933640859f1c54591c9c8, type: 2}
|
||||
m_sharedMaterial: {fileID: -6659093157667844055, guid: f242fb3dde1933640859f1c54591c9c8, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 4
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &2045712320
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2045712317}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2045712321
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2045712317}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_StringReference:
|
||||
m_TableReference:
|
||||
m_TableCollectionName: GUID:994c69bf4b2403043bc9562f2d24ee56
|
||||
m_TableEntryReference:
|
||||
m_KeyId: 105795024870969344
|
||||
m_Key:
|
||||
m_FallbackState: 0
|
||||
m_WaitForCompletion: 0
|
||||
m_LocalVariables: []
|
||||
m_FormatArguments: []
|
||||
m_UpdateString:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2045712319}
|
||||
m_TargetAssemblyTypeName: TMPro.TMP_Text, Unity.TextMeshPro
|
||||
m_MethodName: set_text
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName:
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 1
|
||||
references:
|
||||
version: 2
|
||||
RefIds: []
|
||||
--- !u!1 &2056993778
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace AibisDream.Framework
|
||||
{
|
||||
public class CodeTimer : IDisposable
|
||||
{
|
||||
private readonly Stopwatch _stopwatch;
|
||||
private readonly string _name;
|
||||
|
||||
public CodeTimer(string name = "")
|
||||
{
|
||||
_name = name;
|
||||
_stopwatch = Stopwatch.StartNew();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_stopwatch.Stop();
|
||||
UnityEngine.Debug.Log($"[{_name}] 耗时: {_stopwatch.ElapsedMilliseconds}ms");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4637aacee2dd3146acb68ee955cc70c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -4,11 +4,14 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using AibisDream.Framework;
|
||||
using AibisDream.Kit;
|
||||
using AibisDream.Utility;
|
||||
using AibisDream.UI;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UnityEngine;
|
||||
using Yarn.Unity;
|
||||
|
||||
|
||||
namespace AibisDream
|
||||
{
|
||||
public class StorageSystem : VariableStorageBehaviour
|
||||
@@ -218,6 +221,14 @@ namespace AibisDream
|
||||
#region 保存/加载
|
||||
|
||||
public void Save()
|
||||
{
|
||||
ActionKit.Sequence()
|
||||
.Callback(() => UIManager.Instance.GetPanel<InfoPanel>().ShowSaveLoading())
|
||||
.Delay(1f)
|
||||
.Callback(() => UIManager.Instance.GetPanel<InfoPanel>().HideSaveLoading())
|
||||
.Start(this);
|
||||
|
||||
using (new CodeTimer("Save"))
|
||||
{
|
||||
// 先序列化Yarn变量
|
||||
var saveFile = new JObject();
|
||||
@@ -241,6 +252,7 @@ namespace AibisDream
|
||||
DeleteOldSave();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteOldSave()
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace AibisDream.UI
|
||||
[SerializeField] private DemoTimer demoTimer;
|
||||
[SerializeField] private GameObject loading;
|
||||
[SerializeField] private VariableBar variableBar;
|
||||
[SerializeField] private GameObject saveLoading;
|
||||
|
||||
public void SetTimerActive(bool isOpen)
|
||||
{
|
||||
@@ -46,6 +47,16 @@ namespace AibisDream.UI
|
||||
loading.SetActive(false);
|
||||
}
|
||||
|
||||
public void ShowSaveLoading()
|
||||
{
|
||||
saveLoading.SetActive(true);
|
||||
}
|
||||
|
||||
public void HideSaveLoading()
|
||||
{
|
||||
saveLoading.SetActive(false);
|
||||
}
|
||||
|
||||
public bool IsOpen => gameObject.activeSelf;
|
||||
|
||||
public bool IsCloseable => false;
|
||||
|
||||
@@ -14,7 +14,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_StringTable:
|
||||
m_TableReference:
|
||||
m_TableCollectionName: GUID:2e124e99f4170224f9eb9590c304cdaf
|
||||
m_TableCollectionName: GUID:994c69bf4b2403043bc9562f2d24ee56
|
||||
m_AssetTable:
|
||||
m_TableReference:
|
||||
m_TableCollectionName:
|
||||
|
||||
Reference in New Issue
Block a user