@@ -31,7 +31,7 @@ protected override void OnComponentInit(Entity<DoorComponent> ent, ref Component
31
31
32
32
comp . OpeningAnimation = new Animation
33
33
{
34
- Length = TimeSpan . FromSeconds ( comp . OpeningAnimationTime ) ,
34
+ Length = comp . OpeningAnimationTime ,
35
35
AnimationTracks =
36
36
{
37
37
new AnimationTrackSpriteFlick
@@ -47,7 +47,7 @@ protected override void OnComponentInit(Entity<DoorComponent> ent, ref Component
47
47
48
48
comp . ClosingAnimation = new Animation
49
49
{
50
- Length = TimeSpan . FromSeconds ( comp . ClosingAnimationTime ) ,
50
+ Length = comp . ClosingAnimationTime ,
51
51
AnimationTracks =
52
52
{
53
53
new AnimationTrackSpriteFlick
@@ -63,7 +63,7 @@ protected override void OnComponentInit(Entity<DoorComponent> ent, ref Component
63
63
64
64
comp . EmaggingAnimation = new Animation
65
65
{
66
- Length = TimeSpan . FromSeconds ( comp . EmaggingAnimationTime ) ,
66
+ Length = comp . EmaggingAnimationTime ,
67
67
AnimationTracks =
68
68
{
69
69
new AnimationTrackSpriteFlick
@@ -116,14 +116,14 @@ private void UpdateAppearanceForDoorState(Entity<DoorComponent> entity, SpriteCo
116
116
117
117
return ;
118
118
case DoorState . Opening :
119
- if ( entity . Comp . OpeningAnimationTime == 0.0 )
119
+ if ( entity . Comp . OpeningAnimationTime == TimeSpan . Zero )
120
120
return ;
121
121
122
122
_animationSystem . Play ( entity , ( Animation ) entity . Comp . OpeningAnimation , DoorComponent . AnimationKey ) ;
123
123
124
124
return ;
125
125
case DoorState . Closing :
126
- if ( entity . Comp . ClosingAnimationTime == 0.0 || entity . Comp . CurrentlyCrushing . Count != 0 )
126
+ if ( entity . Comp . ClosingAnimationTime == TimeSpan . Zero || entity . Comp . CurrentlyCrushing . Count != 0 )
127
127
return ;
128
128
129
129
_animationSystem . Play ( entity , ( Animation ) entity . Comp . ClosingAnimation , DoorComponent . AnimationKey ) ;
0 commit comments