时间切换

This commit is contained in:
2026-02-09 21:52:47 +08:00
parent 6d4f6d3f9f
commit 71ee3d8b57
11 changed files with 57 additions and 57 deletions
@@ -514,7 +514,7 @@ namespace AibisDream.SystemEditor
keyframes.Add(new ObjectReferenceKeyframe
{
time = currentTime,
value = keyframes[0].value
value = keyframes[^1].value
});
}
@@ -577,7 +577,7 @@ namespace AibisDream.SystemEditor
// 判断JSON类型并解析
ProcessedAnimationData processedData;
string jsonContent = File.ReadAllText(jsonPath);
if (jsonContent.Contains("\"type\":\"manual\"") || jsonContent.Contains("\"type\": \"manual\""))
{
// 手动格式
@@ -588,6 +588,8 @@ namespace AibisDream.SystemEditor
// Aseprite格式
processedData = ParseAsepriteJson(jsonPath, texturePath);
}
// Debug.Log($"processedData: {processedData.ToString()}");
EditorUtility.DisplayProgressBar("生成AnimationClip", "切图...", 0.4f);
@@ -22,12 +22,12 @@ AnimationClip:
curve:
- time: 0
value: {fileID: 1931711126660797183, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 0.6
- time: 0.8
value: {fileID: 557128007507151412, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 1.2
- time: 1.6
value: {fileID: 7818624593967659410, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 2.4
value: {fileID: 7818624593967659410, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 1.8000001
value: {fileID: 1931711126660797183, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
attribute: m_Sprite
path:
classID: 114
@@ -53,13 +53,13 @@ AnimationClip:
- {fileID: 1931711126660797183, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 557128007507151412, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 7818624593967659410, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 1931711126660797183, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 7818624593967659410, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_StopTime: 2.41
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@@ -22,12 +22,12 @@ AnimationClip:
curve:
- time: 0
value: {fileID: 368852046130056288, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 0.6
- time: 0.8
value: {fileID: 744660647468183574, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 1.2
- time: 1.6
value: {fileID: 4510117881843004658, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 2.4
value: {fileID: 4510117881843004658, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 1.8000001
value: {fileID: 368852046130056288, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
attribute: m_Sprite
path:
classID: 114
@@ -53,13 +53,13 @@ AnimationClip:
- {fileID: 368852046130056288, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 744660647468183574, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 4510117881843004658, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 368852046130056288, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 4510117881843004658, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_StopTime: 2.41
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@@ -22,12 +22,12 @@ AnimationClip:
curve:
- time: 0
value: {fileID: -7849584325033050978, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 0.6
- time: 0.8
value: {fileID: -5931125750173974104, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 1.2
- time: 1.6
value: {fileID: 4575991954449924851, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 2.4
value: {fileID: 4575991954449924851, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 1.8000001
value: {fileID: -7849584325033050978, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
attribute: m_Sprite
path:
classID: 114
@@ -53,13 +53,13 @@ AnimationClip:
- {fileID: -7849584325033050978, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: -5931125750173974104, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 4575991954449924851, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: -7849584325033050978, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 4575991954449924851, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_StopTime: 2.41
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@@ -22,12 +22,12 @@ AnimationClip:
curve:
- time: 0
value: {fileID: -1695518933349628278, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 0.6
- time: 0.8
value: {fileID: -7557123068265923505, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 1.2
- time: 1.6
value: {fileID: 4799320229902462110, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 2.4
value: {fileID: 4799320229902462110, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- time: 1.8000001
value: {fileID: -1695518933349628278, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
attribute: m_Sprite
path:
classID: 114
@@ -53,13 +53,13 @@ AnimationClip:
- {fileID: -1695518933349628278, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: -7557123068265923505, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 4799320229902462110, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: -1695518933349628278, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
- {fileID: 4799320229902462110, guid: ad6f826667f95fc4c829acc6adada539, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_StopTime: 2.41
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
@@ -11,7 +11,7 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -611917820797815250}
m_Position: {x: 360, y: 110, z: 0}
m_Position: {x: 360, y: 120, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
@@ -109,7 +109,7 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@@ -163,7 +163,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 9646a1ba338d9884fb9f69ab861e14c8
spriteID: dc76ab5229f197349848882bfa240666
internalID: -1695518933349628278
vertices: []
indices:
@@ -184,7 +184,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: b38c17f1734d9ad4ab7c3c041e736929
spriteID: f6b8ca29a5c03eb49ac89f83fafcc399
internalID: -7557123068265923505
vertices: []
indices:
@@ -205,7 +205,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 40daf977e01567d40a9536a275df5c60
spriteID: 0ff0c227f801a744cb11e875bd4facbb
internalID: 4799320229902462110
vertices: []
indices:
@@ -226,7 +226,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 383c5435e0072cb45ba16fe99311469e
spriteID: 9defae346ead6564ca0ea18eba262a53
internalID: 1931711126660797183
vertices: []
indices:
@@ -247,7 +247,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 1e60e0a2bea7c904dbf9914fda47fe54
spriteID: d6f5af225ef979b4696bb1372caba284
internalID: 557128007507151412
vertices: []
indices:
@@ -268,7 +268,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: d27831f8e0536cb47ac0b83c59dc8b49
spriteID: cc66771adb97f034a8fa2ffa614a4e09
internalID: 7818624593967659410
vertices: []
indices:
@@ -289,7 +289,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: c2541ee863c3b7743a54706a4e89ac9f
spriteID: de790ac9989e78a489be4c05099d50f6
internalID: -7849584325033050978
vertices: []
indices:
@@ -310,7 +310,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 2e2c8561f32cebe4d85049d6780f5324
spriteID: 3681283e14ed4a945a7efa04a091dba7
internalID: -5931125750173974104
vertices: []
indices:
@@ -331,7 +331,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 8fc0b6e950959ec4aa4949caa01015e4
spriteID: b82761dfa07276941b822dc1034d714f
internalID: 4575991954449924851
vertices: []
indices:
@@ -352,7 +352,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 752a5aa423aea0f4a84d93690c95a8a9
spriteID: 613a198b1449f4c45871eab7bcc0a578
internalID: 368852046130056288
vertices: []
indices:
@@ -373,7 +373,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: e0322829aab64fa41b59a8ca8fa68e45
spriteID: cc4fa6c63855c8148a5f36260755030d
internalID: 744660647468183574
vertices: []
indices:
@@ -394,7 +394,7 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 5126041eeb887d24dad1ffe48a024111
spriteID: 80a41df0d6fc5b844bc2cd25057ffc9a
internalID: 4510117881843004658
vertices: []
indices:
@@ -5,7 +5,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 1.aseprite": {
"frame": { "x": 288, "y": 0, "w": 288, "h": 162 },
@@ -13,7 +13,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 2.aseprite": {
"frame": { "x": 576, "y": 0, "w": 288, "h": 162 },
@@ -21,7 +21,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 3.aseprite": {
"frame": { "x": 864, "y": 0, "w": 288, "h": 162 },
@@ -29,7 +29,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 4.aseprite": {
"frame": { "x": 1152, "y": 0, "w": 288, "h": 162 },
@@ -37,7 +37,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 5.aseprite": {
"frame": { "x": 1440, "y": 0, "w": 288, "h": 162 },
@@ -45,7 +45,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 6.aseprite": {
"frame": { "x": 1728, "y": 0, "w": 288, "h": 162 },
@@ -53,7 +53,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 7.aseprite": {
"frame": { "x": 0, "y": 162, "w": 288, "h": 162 },
@@ -61,7 +61,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 8.aseprite": {
"frame": { "x": 288, "y": 162, "w": 288, "h": 162 },
@@ -69,7 +69,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 9.aseprite": {
"frame": { "x": 576, "y": 162, "w": 288, "h": 162 },
@@ -77,7 +77,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 10.aseprite": {
"frame": { "x": 864, "y": 162, "w": 288, "h": 162 },
@@ -85,7 +85,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
},
"长焦时间切换 11.aseprite": {
"frame": { "x": 1152, "y": 162, "w": 288, "h": 162 },
@@ -93,7 +93,7 @@
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 288, "h": 162 },
"sourceSize": { "w": 288, "h": 162 },
"duration": 600
"duration": 800
}
},
"meta": {
+3 -3
View File
@@ -15178,7 +15178,7 @@ MonoBehaviour:
demoTimer: {fileID: 398371926}
loading: {fileID: 749156594}
variableBar: {fileID: 1986521826}
saveLoading: {fileID: 2045712317}
saveLoading: {fileID: 0}
--- !u!1 &927888433
GameObject:
m_ObjectHideFlags: 0
@@ -30154,8 +30154,8 @@ MonoBehaviour:
targetAnimator: {fileID: 319430490}
originAnimator: {fileID: 672000074}
canvasGroup: {fileID: 2091099327}
fadeTime: 2
holdTime: 1.5
fadeTime: 3
holdTime: 2.5
inoutTime: 0.5
--- !u!1 &2091451637
GameObject:
-2
View File
@@ -4,8 +4,6 @@ using System.IO;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEngine;
using UnityEngine.Networking;
namespace AibisDream.Utility
{