|
@@ -232,6 +232,36 @@ public class SkeletonDataMonitor
|
|
|
AttackController.SpineAniKey sak;
|
|
AttackController.SpineAniKey sak;
|
|
|
sak.aniName = animationName;
|
|
sak.aniName = animationName;
|
|
|
sak.keys = new List<AttackController.AttackKeyType>();
|
|
sak.keys = new List<AttackController.AttackKeyType>();
|
|
|
|
|
+ AttackController.AttackKeyType akt = new AttackController.AttackKeyType();
|
|
|
|
|
+ bool isStarKey = true;
|
|
|
|
|
+ int canWrite = 0;
|
|
|
|
|
+ foreach(var timeline in animation.Timelines)
|
|
|
|
|
+ {
|
|
|
|
|
+ if(timeline is EventTimeline eventTimeline)
|
|
|
|
|
+ {
|
|
|
|
|
+ foreach(var eventFrame in eventTimeline.Events)
|
|
|
|
|
+ {
|
|
|
|
|
+ string eventName = eventFrame.ToString();
|
|
|
|
|
+ float eventTime = eventFrame.Time;
|
|
|
|
|
+ if (isStarKey)
|
|
|
|
|
+ {
|
|
|
|
|
+ akt.startKeyName = eventName;
|
|
|
|
|
+ akt.startKeyTime = eventTime;
|
|
|
|
|
+ akt.attackType = AttackController.KeyType.AttackStart;
|
|
|
|
|
+ canWrite = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(canWrite == 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ akt.endKeyName = eventName;
|
|
|
|
|
+ akt.endKeyTime = eventTime;
|
|
|
|
|
+ akt.endType = AttackController.KeyType.AttackEnd;
|
|
|
|
|
+ canWrite = 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ isStarKey = !isStarKey;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (canWrite == 2) attack.attackKeys.Add(sak);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|