Awperative Completely Reworked!
This commit is contained in:
54
Awperative/Kernel/Behavior/Core.cs
Normal file
54
Awperative/Kernel/Behavior/Core.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
|
||||
namespace Awperative;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The lowest level scripting class in Awperative. Components are scene level and provide access to all scene level methods, can be applied to any docker and inherited
|
||||
/// Sadly component does not have excessive access to specific types.
|
||||
/// Anything that inherits Component is built to work in any DockerEntity, which leads to generic
|
||||
/// Assumptions. If you want to make a body specific or scene specific component both classes are available.
|
||||
/// </summary>
|
||||
public abstract partial class Behavior : Docker
|
||||
{
|
||||
internal Docker Docker;
|
||||
|
||||
public Scene Scene;
|
||||
public List<Behavior> Parents { get; private set; }
|
||||
|
||||
//todo tags order and singleton
|
||||
|
||||
|
||||
|
||||
internal virtual void Initiate(Docker docker) {
|
||||
Docker = docker;
|
||||
Create();
|
||||
}
|
||||
|
||||
|
||||
|
||||
internal virtual void End() {
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//GAME HAS JUST BEGUN/ended
|
||||
public virtual void Unload() {}
|
||||
|
||||
//WE ARE LOADING STUFF
|
||||
public virtual void Load() {}
|
||||
|
||||
//You know what these do
|
||||
public virtual void Update(GameTime __gameTime) {}
|
||||
public virtual void Draw(GameTime __gameTime) {}
|
||||
|
||||
//component/body/scene is being created or destroyed
|
||||
public virtual void Create() {}
|
||||
public virtual void Destroy() {}
|
||||
}
|
||||
Reference in New Issue
Block a user