using SFML.Graphics; using SFML.System; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Firebird2D.Interfaces.Actors { public enum ResizeMode { Resize, DontResize, CutImage } public enum AnchorPoint { topLeft, topMiddle, topRight, bottomLeft, bottomMiddle, bottomRight, LeftMiddle, RightMiddle, Center } public enum AnchorMode { stayInValue, stayInRatio, stayInPlace } public struct Anchors { public bool top; public bool left; public bool right; public bool bottom; AnchorPoint anchorPoint; AnchorMode anchorMode; public Anchors() : this(true, true, false, false, AnchorPoint.Center, AnchorMode.stayInValue) { } public Anchors(bool top, bool left, bool right, bool bottom) : this(top, left, right, bottom, AnchorPoint.Center, AnchorMode.stayInValue) { } public Anchors(bool top, bool left, bool right, bool bottom, AnchorPoint anchorPoint) : this(top, left, right, bottom, anchorPoint, AnchorMode.stayInValue) { } public Anchors(bool top, bool left, bool right, bool bottom, AnchorPoint anchorPoint, AnchorMode anchorMode) { this.top = top; this.left = left; this.right = right; this.bottom = bottom; this.anchorPoint = anchorPoint; this.anchorMode = anchorMode; } } public interface IRenderable { public void Render(RenderWindow window); } public interface IUpdatable { void Tick(int timeDifference); } public interface IResizable : IRenderable { void Resize(int width, int height); void OnWindowResize(int width, int height); } public interface I_BaseActor : IRenderable, IUpdatable, IComparable { public string Name { get; } public ResizeMode resizeMode { get; set; } public Anchors Anchors { get; set; } public Vector2f Position { get; set; } public Vector2f Size { get; set; } public float Rotation { get; set; } public int Z_Index { get; set; } } }