mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 07:12:27 +02:00
* Partial sprite component ECS * release notes * tests * Why * SetSnapCardinals * NoRotation * DirectionOverride * This is why I love distinct overrides that take in object * LayerSetData * ISerializationHooks continue to haunt me * Relocate SetShader * LayerSetSprite * LayerSetTexture * yipeeeee * LayerSetRsi * Remove GetFallbackState * LayerSet Scale,Rotation,Color,Visible * Fix LayerSetRsi * LayerSetOffset * LayerSetDirOffset * Add overrides that take in a Layer * LayerSetAnimationTime * LayerSetRenderingStrategy * Reduce Resolves, Add Layer.Index * Access * Try fix NREs * Asserts * LayerGetState * Cleanup * Merge helper partial classes * partial rendering * GetLayerDirectionCount * Cache local bounds * RenderLayer * RefreshCachedState * RoundToCardinalAngle * Fix the pr * Fix debug assert --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System.Numerics;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Shared.Graphics.RSI;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Robust.Client.GameObjects
|
|
{
|
|
public interface ISpriteLayer
|
|
{
|
|
SpriteComponent.DirectionOffset DirOffset { get; set; }
|
|
|
|
RSI? Rsi { get; set; }
|
|
RSI.StateId RsiState { get; set; }
|
|
RSI? ActualRsi { get; }
|
|
|
|
Texture? Texture { get; set; }
|
|
|
|
Angle Rotation { get; set; }
|
|
Vector2 Scale { get; set; }
|
|
|
|
bool Visible { get; set; }
|
|
Color Color { get; set; }
|
|
|
|
float AnimationTime { get; set; }
|
|
int AnimationFrame { get; }
|
|
bool AutoAnimated { get; set; }
|
|
|
|
RsiDirection EffectiveDirection(Angle worldRotation);
|
|
|
|
/// <summary>
|
|
/// Layer size in pixels.
|
|
/// Don't account layer scale or sprite world transform.
|
|
/// </summary>
|
|
Vector2i PixelSize { get; }
|
|
|
|
/// <summary>
|
|
/// Calculate layer bounding box in sprite local-space coordinates.
|
|
/// </summary>
|
|
/// <returns>Bounding box in sprite local-space coordinates.</returns>
|
|
Box2 CalculateBoundingBox();
|
|
}
|
|
}
|