mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-06 17:58:05 +02:00
Property animations track (#867)
* WiP property animations system * Use better lerp for Angle property animations. * Fix handling of offset in sprite component. * Allow animating some sprite layer properties. * Allow animating some Transform properties. Obviously not advisable for server entities, but great for client side entities! * Improve animation property interpolation handling. Added a "previous" mode. Made values that cannot be sanely interpolated fall back to this mode. * Improve some animation docs.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Graphics.Shaders;
|
||||
using Robust.Shared.Animations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Maths;
|
||||
@@ -9,7 +10,7 @@ using Robust.Shared.Utility;
|
||||
|
||||
namespace Robust.Client.Interfaces.GameObjects.Components
|
||||
{
|
||||
public interface ISpriteComponent : IComponent
|
||||
public interface ISpriteComponent : IComponent, IAnimationProperties
|
||||
{
|
||||
void FrameUpdate(float delta);
|
||||
|
||||
@@ -23,21 +24,25 @@ namespace Robust.Client.Interfaces.GameObjects.Components
|
||||
/// <summary>
|
||||
/// A scale applied to all layers.
|
||||
/// </summary>
|
||||
[Animatable]
|
||||
Vector2 Scale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A rotation applied to all layers.
|
||||
/// </summary>
|
||||
[Animatable]
|
||||
Angle Rotation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset applied to all layers.
|
||||
/// </summary>
|
||||
[Animatable]
|
||||
Vector2 Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Color to multiply all layers with.
|
||||
/// </summary>
|
||||
[Animatable]
|
||||
Color Color { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user