BREAKING CHANGE: Removed MonoGame Package
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="ISprite"/> field.
|
||||
/// </summary>
|
||||
public interface IAssignableSprite : IAssignable
|
||||
{
|
||||
/// <summary>
|
||||
/// Callback triggered when the <see cref="ISprite"/> value has has been assigned a new value.
|
||||
/// </summary>
|
||||
Action<IAssignableSprite>? OnSpriteAssigned { get; set; }
|
||||
|
||||
/// <inheritdoc cref="ISprite" />
|
||||
ISprite Sprite { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Assign a value to the <see cref="ISprite"/> field of this object
|
||||
/// </summary>
|
||||
/// <param name="sprite">New <see cref="ISprite"/> to assign.</param>
|
||||
/// <returns>
|
||||
/// <see cref="true"/>, if the value given assigned successfully assigned, <see cref="false"/> if not.
|
||||
/// </returns>
|
||||
bool Assign(ISprite sprite);
|
||||
}
|
@@ -2,8 +2,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
/// <summary>
|
||||
@@ -12,18 +10,18 @@ namespace Syntriax.Engine.Core.Abstract;
|
||||
public interface IBehaviourController : IAssignableGameObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Callback triggered when the <see cref="Update(GameTime)"/> is called but right before the <see cref="OnUpdate"/> action is triggered.
|
||||
/// Callback triggered when the <see cref="Update()"/> is called but right before the <see cref="OnUpdate"/> action is triggered.
|
||||
/// </summary>
|
||||
Action<IBehaviourController, GameTime>? OnPreUpdate { get; set; }
|
||||
Action<IBehaviourController>? OnPreUpdate { get; set; }
|
||||
/// <summary>
|
||||
/// Callback triggered when the <see cref="Update(GameTime)"/> is called.
|
||||
/// Callback triggered when the <see cref="Update()"/> is called.
|
||||
/// </summary>
|
||||
Action<IBehaviourController, GameTime>? OnUpdate { get; set; }
|
||||
Action<IBehaviourController>? OnUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Callback triggered when the <see cref="OnPreDraw(GameTime)"/> is called.
|
||||
/// Callback triggered when the <see cref="OnPreDraw()"/> is called.
|
||||
/// </summary>
|
||||
Action<IBehaviourController, GameTime>? OnPreDraw { get; set; }
|
||||
Action<IBehaviourController>? OnPreDraw { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -84,12 +82,12 @@ public interface IBehaviourController : IAssignableGameObject
|
||||
/// <summary>
|
||||
/// To be called in every frame of the engine. Responsible for notifying <see cref="IBehaviour"/>'s under the <see cref="IBehaviourController"/>'s control that a new frame is happening.
|
||||
/// </summary>
|
||||
/// <param name="gameTime"><see cref="GameTime"/> information from the game.</param>
|
||||
void Update(GameTime gameTime);
|
||||
/// <param name=""><see cref=""/> information from the game.</param>
|
||||
void Update();
|
||||
|
||||
/// <summary>
|
||||
/// To be called before every draw call from the engine. Responsible for notifying <see cref="IBehaviour"/>'s under the <see cref="IBehaviourController"/>'s control that the engine is about to start drawing into the screen.
|
||||
/// </summary>
|
||||
/// <param name="gameTime"><see cref="GameTime"/> information from the game.</param>
|
||||
void UpdatePreDraw(GameTime gameTime);
|
||||
/// <param name=""><see cref=""/> information from the game.</param>
|
||||
void UpdatePreDraw();
|
||||
}
|
||||
|
@@ -1,23 +1,11 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
public interface ICamera
|
||||
public interface ICamera : IAssignableTransform
|
||||
{
|
||||
Action<ICamera>? OnMatrixTransformChanged { get; set; }
|
||||
Action<ICamera>? OnViewportChanged { get; set; }
|
||||
Action<ICamera>? OnPositionChanged { get; set; }
|
||||
Action<ICamera>? OnRotationChanged { get; set; }
|
||||
Action<ICamera>? OnZoomChanged { get; set; }
|
||||
|
||||
Matrix MatrixTransform { get; }
|
||||
Viewport Viewport { get; set; }
|
||||
|
||||
Vector2 Position { get; set; }
|
||||
|
||||
float Rotation { get; set; }
|
||||
float Zoom { get; set; }
|
||||
|
||||
void Update();
|
||||
|
@@ -1,8 +0,0 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
public interface IDisplayable
|
||||
{
|
||||
public void Draw(SpriteBatch spriteBatch);
|
||||
}
|
@@ -1,12 +1,10 @@
|
||||
using System;
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
public interface IGameObject : IEntity, IAssignableTransform, IAssignableBehaviourController, INameable, IInitialize
|
||||
{
|
||||
Action<IGameObject, GameTime>? OnUpdated { get; set; }
|
||||
Action<IGameObject>? OnUpdated { get; set; }
|
||||
|
||||
void Update(GameTime time);
|
||||
void Update();
|
||||
}
|
||||
|
@@ -1,13 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
// TODO Probably gonna have to rethink this
|
||||
public interface ISprite
|
||||
{
|
||||
Action<ISprite>? OnTextureChanged { get; set; }
|
||||
|
||||
Texture2D Texture2D { get; set; }
|
||||
}
|
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
public interface ITransform
|
||||
@@ -10,8 +8,8 @@ public interface ITransform
|
||||
Action<ITransform>? OnScaleChanged { get; set; }
|
||||
Action<ITransform>? OnRotationChanged { get; set; }
|
||||
|
||||
Vector2 Position { get; set; }
|
||||
Vector2 Scale { get; set; }
|
||||
Vector2D Position { get; set; }
|
||||
Vector2D Scale { get; set; }
|
||||
|
||||
float Rotation { get; set; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user