BREAKING CHANGE: Removed MonoGame Package

This commit is contained in:
2024-01-22 22:45:40 +03:00
parent 1c884d49bb
commit 81f9ef10bf
16 changed files with 53 additions and 296 deletions

View File

@@ -2,17 +2,15 @@ using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Xna.Framework;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public class BehaviourController : IBehaviourController
{
public Action<IBehaviourController, GameTime>? OnPreUpdate { get; set; }
public Action<IBehaviourController, GameTime>? OnUpdate { get; set; } = null;
public Action<IBehaviourController, GameTime>? OnPreDraw { get; set; } = null;
public Action<IBehaviourController>? OnPreUpdate { get; set; }
public Action<IBehaviourController>? OnUpdate { get; set; } = null;
public Action<IBehaviourController>? OnPreDraw { get; set; } = null;
public Action<IBehaviourController, IBehaviour>? OnBehaviourAdded { get; set; } = null;
public Action<IBehaviourController, IBehaviour>? OnBehaviourRemoved { get; set; } = null;
@@ -115,21 +113,21 @@ public class BehaviourController : IBehaviourController
return true;
}
public void Update(GameTime gameTime)
public void Update()
{
if (!GameObject.StateEnable.Enabled)
return;
OnPreUpdate?.Invoke(this, gameTime);
OnUpdate?.Invoke(this, gameTime);
OnPreUpdate?.Invoke(this);
OnUpdate?.Invoke(this);
}
public void UpdatePreDraw(GameTime gameTime)
public void UpdatePreDraw()
{
if (!GameObject.StateEnable.Enabled)
return;
OnPreDraw?.Invoke(this, gameTime);
OnPreDraw?.Invoke(this);
}
public BehaviourController() { }