using System.Collections.Generic; using Microsoft.Xna.Framework; namespace Awperative; /// /// 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. /// public abstract partial class Behavior : Docker { /// /// Current parent of the Behavior. Can be either Scene or another Behavior. /// internal Docker Docker; /// /// Identifiers for Behaviors. /// public List Tags; /// /// Order for when Behaviors are called on. Only applies between Components on the same Docker. /// public int Priority; /// /// To be called when the Behavior is created. /// /// Docker that this spawned in this Behavior internal void Initiate(Docker __parent) { Docker = __parent; Create(); } /// /// Called when the Game is Closing; does not always happen depending on if it is Force Closed. /// protected internal virtual void Unload() {} /// /// Called when the Game is Loading. /// protected internal virtual void Load() {} /// /// Called every frame before Draw, it is recommended to do any Non-Drawing update logic here. /// protected internal virtual void Update() {} /// /// Called after Update when the screen is being drawn. Please only put Drawing related logic here. /// protected internal virtual void Draw() {} /// /// Called when the Component is created. /// protected internal virtual void Create() {} /// /// Called when the Component is destroyed. Not called when the Game is closed. /// protected internal virtual void Destroy() {} }