mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-03 10:37:05 +02:00
Co-authored-by: Alex Evgrashin <evgrashin.adl@gmail.com> Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using Robust.Client.Graphics;
|
|
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; }
|
|
|
|
RSI.State.Direction EffectiveDirection(Angle worldRotation);
|
|
|
|
Vector2 LocalToLayer(Vector2 localPos);
|
|
|
|
/// <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();
|
|
}
|
|
}
|