2
0
Fork 0

fix 时间轴互相调用的时序问题

master
cd 2 years ago
parent e61898b974
commit e7762711b7

@ -21,6 +21,6 @@ MonoBehaviour:
mLastUsedPackagesHash: 1177269412 mLastUsedPackagesHash: 1177269412
mLastUsedPackagesCount: 1 mLastUsedPackagesCount: 1
mLastBuildCode: 1 mLastBuildCode: 1
mLastEditorStartupTimeTicks: 638214577847877530 mLastEditorStartupTimeTicks: 638222589413001092
mNewVersionAvailable: 1 mNewVersionAvailable: 1
mLastAttachedFlowPlayerValue: 0 mLastAttachedFlowPlayerValue: 0

@ -14,6 +14,19 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
serializedNodes: [] serializedNodes: []
--- !u!114 &-8060311902172184737 --- !u!114 &-8060311902172184737
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1655710724, guid: 23cdf4a0ba64c164d8ffb0c744ae259d, type: 3}
m_Name: HierarchyManager
m_EditorClassIdentifier:
serializedNodes: []
--- !u!114 &-7157632089595105858
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 3 m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@ -432,7 +445,7 @@ MonoBehaviour:
m_Script: {fileID: -1676762633, guid: 23cdf4a0ba64c164d8ffb0c744ae259d, type: 3} m_Script: {fileID: -1676762633, guid: 23cdf4a0ba64c164d8ffb0c744ae259d, type: 3}
m_Name: ArticyDatabase m_Name: ArticyDatabase
m_EditorClassIdentifier: m_EditorClassIdentifier:
mHierarchy: {fileID: 2896495122622374548} mHierarchy: {fileID: -7157632089595105858}
mLocalization: {fileID: -4256971298007036964} mLocalization: {fileID: -4256971298007036964}
mInternalProject: mInternalProject:
mName: touhou mName: touhou

@ -1578,7 +1578,7 @@ PlayableDirector:
m_GameObject: {fileID: 1645380337361164332} m_GameObject: {fileID: 1645380337361164332}
m_Enabled: 1 m_Enabled: 1
serializedVersion: 3 serializedVersion: 3
m_PlayableAsset: {fileID: 11400000, guid: 1f7ab546215e197408d725a0cc0a402b, type: 2} m_PlayableAsset: {fileID: 11400000, guid: 0bd5f8223b563b5478bdf14ef83b5a48, type: 2}
m_InitialState: 0 m_InitialState: 0
m_WrapMode: 2 m_WrapMode: 2
m_DirectorUpdateMode: 1 m_DirectorUpdateMode: 1
@ -1732,6 +1732,14 @@ PlayableDirector:
value: {fileID: 1645380337361164335} value: {fileID: 1645380337361164335}
- key: {fileID: 2359698281133013487, guid: 3288bbd90725c2944a49f99a81cc1fee, type: 2} - key: {fileID: 2359698281133013487, guid: 3288bbd90725c2944a49f99a81cc1fee, type: 2}
value: {fileID: 1645380337361164335} value: {fileID: 1645380337361164335}
- key: {fileID: -4824941642191393376, guid: c289f3228d547dc4285b0bd67a1ef3b0, type: 2}
value: {fileID: 5972941309607553105}
- key: {fileID: -4750574827767443630, guid: c289f3228d547dc4285b0bd67a1ef3b0, type: 2}
value: {fileID: 1645380337361164335}
- key: {fileID: -4824941642191393376, guid: 0bd5f8223b563b5478bdf14ef83b5a48, type: 2}
value: {fileID: 5972941309607553105}
- key: {fileID: -4750574827767443630, guid: 0bd5f8223b563b5478bdf14ef83b5a48, type: 2}
value: {fileID: 1645380337361164335}
m_ExposedReferences: m_ExposedReferences:
m_References: [] m_References: []
--- !u!212 &89448210413526911 --- !u!212 &89448210413526911

@ -10,4 +10,5 @@ public class TimelineComponent : IComponent
public double TimeMax; public double TimeMax;
public bool IsPause; public bool IsPause;
public bool IsBeThrow; public bool IsBeThrow;
public bool IsEnd;
} }

@ -1,3 +1,4 @@
using System.Collections.Generic;
using Entitas; using Entitas;
using UnityEngine; using UnityEngine;
using Game; using Game;
@ -32,6 +33,12 @@ public class TimelineSystem : IExecuteSystem, IInitializeSystem
private static void UpdateCheckEnd(GameEntity entity) private static void UpdateCheckEnd(GameEntity entity)
{ {
var timeline = entity.timeline; var timeline = entity.timeline;
if (timeline.IsEnd)
{
timeline.IsEnd = false;
Util.EndSkillTimeline(entity);
return;
}
timeline.TimePast += Time.deltaTime; timeline.TimePast += Time.deltaTime;
if (timeline.TimePast >= timeline.TimeMax) if (timeline.TimePast >= timeline.TimeMax)
{ {
@ -39,7 +46,7 @@ public class TimelineSystem : IExecuteSystem, IInitializeSystem
} }
} }
private static void UpdateTimeline(TimelineComponent timeline) private void UpdateTimeline(TimelineComponent timeline)
{ {
foreach (var clip in timeline.Timeline.Clips) foreach (var clip in timeline.Timeline.Clips)
{ {

@ -36,7 +36,7 @@ namespace Game
private void BreakSkill() private void BreakSkill()
{ {
TimelineManager.Instance.EndSkillTimeline(Owner); Owner.timeline.IsEnd = true;
} }
} }
} }

@ -749,7 +749,7 @@ MonoBehaviour:
SizeY: 2.5 SizeY: 2.5
Radius: 0 Radius: 0
Angle: 0 Angle: 0
throwTimeline: throwTimeline: {fileID: 11400000, guid: 0bd5f8223b563b5478bdf14ef83b5a48, type: 2}
--- !u!114 &5178577764301111608 --- !u!114 &5178577764301111608
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1

@ -654,13 +654,9 @@ MonoBehaviour:
m_Version: 0 m_Version: 0
m_Tracks: m_Tracks:
- {fileID: -4824941642191393376} - {fileID: -4824941642191393376}
- {fileID: 6690682390998089378}
- {fileID: 5466744683385811380}
- {fileID: -5493165062151283881} - {fileID: -5493165062151283881}
- {fileID: -4750574827767443630} - {fileID: -4750574827767443630}
- {fileID: -1704311901145742241} - {fileID: -1704311901145742241}
- {fileID: 8065103114700200184}
- {fileID: -4645220259691914875}
- {fileID: 5878054341450424456} - {fileID: 5878054341450424456}
m_FixedDuration: 0.9 m_FixedDuration: 0.9
m_EditorSettings: m_EditorSettings:
@ -762,7 +758,7 @@ MonoBehaviour:
SizeY: 2.5 SizeY: 2.5
Radius: 0 Radius: 0
Angle: 0 Angle: 0
throwTimeline: throwTimeline: {fileID: 0}
--- !u!114 &5178577764301111608 --- !u!114 &5178577764301111608
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -894,7 +890,7 @@ MonoBehaviour:
m_Start: 0 m_Start: 0
m_ClipIn: 0 m_ClipIn: 0
m_Asset: {fileID: 2913051393758378932} m_Asset: {fileID: 2913051393758378932}
m_Duration: 0.6200000000000001 m_Duration: 1.6666666666666667
m_TimeScale: 1 m_TimeScale: 1
m_ParentTrack: {fileID: 5878054341450424456} m_ParentTrack: {fileID: 5878054341450424456}
m_EaseInDuration: 0 m_EaseInDuration: 0

Loading…
Cancel
Save