This commit is contained in:
2026-02-15 10:02:21 -05:00
parent 843979e10b
commit 4ac4c39d2f
23 changed files with 683 additions and 618 deletions

View File

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

View File

@@ -1,68 +0,0 @@
using System.Collections.Generic;
using System.Collections.Immutable;
namespace Awperative;
public abstract partial class Component : Container
{
public Scene Scene => __QueryScene();
private Scene __QueryScene() {
if (Container is Scene scene) return scene;
if (Container is Component behavior) return behavior.__QueryScene();
return null;
}
public ImmutableArray<Container> Dockers => __QueryDockers();
private ImmutableArray<Container> __QueryDockers() {
List<Container> returnValue = [];
Container currentContainer = Container;
while (!(currentContainer is Scene))
if (currentContainer is Component behavior) {
returnValue.Add(currentContainer);
currentContainer = behavior.Container;
}
returnValue.Add(currentContainer);
return ImmutableArray.Create<Container>(returnValue.ToArray());
}
public Component Parent => __QueryParent();
private Component __QueryParent() {
if (Container is Component behavior)
return behavior;
return null;
}
public ImmutableArray<Component> Parents => __QueryBehaviors();
private ImmutableArray<Component> __QueryBehaviors() {
List<Component> returnValue = [];
Container currentContainer = Container;
while (!(currentContainer is Scene))
if (currentContainer is Component behavior) {
returnValue.Add(behavior);
currentContainer = behavior.Container;
}
return ImmutableArray.Create<Component>(returnValue.ToArray());
}
}

View File

@@ -0,0 +1,410 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
namespace Awperative;
/// <summary>
/// Base class for all Awperative Entities. Responsible for Managing hierarchy between Components and Scenes, has Extensive Component Manipulation Available.
/// Also transfers Time and Carries most of the responsibilities akin to the Component.
/// </summary>
/// <remarks> Please don't inherit this I don't know why you would</remarks>
/// <author> Avery Norris </author>
public abstract partial class ComponentDocker
{
/// <summary>
/// List of all Components belonging to the Docker, Please Use Add, Get, Move and Destroy to modify it.
/// </summary>
public ImmutableArray<Component> Components => [.._Components];
/// <summary>
/// Amount of all Components in the Docker
/// </summary>
public int Count => _Components.Count;
/// <summary>
/// Core of Docker, contains all of our precious Components.
/// </summary>
internal HashSet<Component> _Components = [];
/// <summary>
/// Called by Awperative when the game is Closed, sends the event to all children; and they send it to their children.
/// </summary>
/// <remarks> Will not always trigger if the program is force closed </remarks>
internal virtual void ChainUnload() { foreach (Component component in (Component[])[.._Components]) { component.Unload(); component.ChainUnload(); } }
/// <summary>
/// Called by Awperative when the game is Opened, sends the event to all children; and they send it to their children.
/// </summary>
internal virtual void ChainLoad() { foreach (Component component in (Component[])[.._Components]) { component.Load(); component.ChainLoad(); } }
/// <summary>
/// Called by Awperative when the game is Updated sends the event to all children; and they send it to their children.
/// </summary>
internal virtual void ChainUpdate() { foreach (Component component in (Component[])[.._Components]) { component.Update(); component.ChainUpdate(); } }
/// <summary>
/// Called by Awperative when the game is Drawn, sends the event to all children; and they send it to their children.
/// </summary>
/// <remarks> Only use this method for drawing methods</remarks>
internal virtual void ChainDraw() { foreach (Component component in (Component[])[.._Components]) { component.Draw(); component.ChainDraw(); } }
/// <summary>
/// Called by Awperative when this Component is destroyed, sends the event to all children; since they will be Destroyed too. And they send it to their children.
/// </summary>
/// <remarks> Not called when the game is closed</remarks>
internal virtual void ChainDestroy() { foreach(Component component in (Component[])[.._Components]) { component.Destroy(); component.ChainDestroy(); } }
/// <summary>
/// Called by Awperative when this is Created, sends the event to all children; and they send it to their children.
/// </summary>
internal virtual void ChainCreate() { foreach (Component component in (Component[])[.._Components]) { component.Create(); component.ChainCreate(); } }
/// <summary>
/// Add a new Component to the Docker; This is the only way they should be created.
/// </summary>
/// <param name="__args"> Arguments to construct the Component with</param>
/// <typeparam name="__Type"> Type of Component to instantiate</typeparam>
/// <returns></returns>
public __Type Add<__Type>(object[] __args) where __Type : Component {
//Log Action
Debug.LogAction("Adding Component to Docker", ["Type", "Args", "Docker"],
[typeof(__Type).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]", GetHashCode().ToString()]);
//Component does not have a constructor that matches the given args
if (typeof(__Type).GetConstructor(__args.Select(x => x.GetType()).ToArray()) == null) {
Debug.LogError("Component cannot be constructed with the given arguments",
["Type", "Args"],
[typeof(__Type).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]"]); return null;
};
Component newComponent;
//Tries to instantiate Component, and sends a fail call if an issue occurs.
try { newComponent = (__Type)Activator.CreateInstance(typeof(__Type), __args); }
catch {
Debug.LogError("Component creation failed!", ["Type", "Args", "Docker"],
[typeof(__Type).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]", GetHashCode().ToString()]); return null;
}
//If Component is null do not add
if(newComponent == null) {
Debug.LogError("Activator created Null Component", ["Type", "Args", "Docker"],
[typeof(__Type).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]", GetHashCode().ToString()]); return null;
}
//Add to docker and initialize the new Component
_Components.Add(newComponent);
newComponent.Initiate(this);
//Logs successful action!
Debug.LogState("Successfully Created Component and Attached it to Docker", ["Type", "Args", "Docker", "Component"],
[typeof(__Type).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]", GetHashCode().ToString(), newComponent.GetHashCode().ToString()]);
return (__Type) newComponent;
}
/// <summary>
/// Adds a new Component to the Docker; This is the only way they should be created.
/// </summary>
/// <typeparam name="__Type"></typeparam>
/// <returns></returns>
public __Type Add<__Type>() where __Type : Component => Add<__Type>([]);
/// <summary>
/// Transfers a child Component to another Docker
/// </summary>
/// <param name="__component"> Component to move</param>
/// <param name="__componentDocker"> Docker to move component to</param>
/// <remarks> Components cannot transfer themselves with this Method!</remarks>
public void Move(Component __component, ComponentDocker __componentDocker) {
//This allows self transfer behavior while preserving Docker's actual job, Before all other statements to prevent Double-Debugging.
if (__component == this) { __component.ComponentDocker.Move(__component, __componentDocker); return; }
Debug.LogAction("Transferring Component to Different Docker", ["Component", "Type", "CurrentDocker", "NewDocker"],
[__component.GetHashCode().ToString(), __component.GetType().ToString(), GetHashCode().ToString(), __componentDocker.GetHashCode().ToString()]);
if (__component == null) {
Debug.LogError("Component is null!", ["Component", "Type", "CurrentDocker", "NewDocker"],
[__component.GetHashCode().ToString(), __component.GetType().ToString(), GetHashCode().ToString(), __componentDocker.GetHashCode().ToString()]); return; }
if (!_Components.Contains(__component)) {
Debug.LogError("Docker does not have ownership of Component", ["Component", "Type", "CurrentDocker", "NewDocker"],
[__component.GetHashCode().ToString(), __component.GetType().ToString(), GetHashCode().ToString(), __componentDocker.GetHashCode().ToString()]); return; }
//Update docker lists
__componentDocker._Components.Add(__component);
_Components.Remove(__component);
//Update components parent
__component.ComponentDocker = __componentDocker;
Debug.LogState("Successfully Transferred Component to a new Docker" , ["Component", "Type", "CurrentDocker", "NewDocker"],
[__component.GetHashCode().ToString(), __component.GetType().ToString(), GetHashCode().ToString(), __componentDocker.GetHashCode().ToString()]);
}
/// <summary>
/// Transfers the first found Component of a specific type to another Docker
/// </summary>
/// <param name="__componentDocker"> Docker to move component to</param>
/// <typeparam name="__Type"> Type of component</typeparam>
public void Move<__Type>(ComponentDocker __componentDocker) where __Type : Component => Move(Get<__Type>(), __componentDocker);
/// <summary>
/// Transfers all Components in a list to another Docker.
/// </summary>
/// <param name="__Components"> List of Components to transfer</param>
/// <param name="__componentDocker"> Docker to move Component to</param>
public void MoveAll(IEnumerable<Component> __Components, ComponentDocker __componentDocker) { foreach (Component Component in (Component[])[.._Components]) Move(Component, __componentDocker); }
/// <summary>
/// Transfers all Components of a type to another Docker.
/// </summary>
/// <param name="__componentDocker"> Target Docker</param>
/// <typeparam name="__Type"> Type of Components to transfer</typeparam>
public void MoveAll<__Type>(ComponentDocker __componentDocker) where __Type : Component => MoveAll(GetAll<__Type>(), __componentDocker);
/// <summary>
/// Searches and returns the first Component of a type found on the Docker.
/// </summary>
/// <typeparam name="__Type"> The Type of Component to search for</typeparam>
/// <returns></returns>
public __Type Get<__Type>() where __Type : Component {
Debug.LogAction("Searching for Component", ["Type", "Docker"],
[typeof(__Type).ToString(), GetHashCode().ToString()]);
//Iterates through the loop and returns if a match is found
foreach (Component component in (Component[])[.._Components]) {
if (component is __Type foundComponent) {
Debug.LogState("Found Component", ["Type", "Component", "Docker"],
[typeof(__Type).ToString(), foundComponent.GetHashCode().ToString(), GetHashCode().ToString()]);
return foundComponent;
}
}
//Throws error if there is no Component found
Debug.LogError("Docker does not have target Component", ["Type", "Docker"],
[typeof(__Type).ToString(), GetHashCode().ToString()]); return null;
}
/// <summary>
/// Searches and returns all Components of a type found on the Docker.
/// </summary>
/// <typeparam name="__Type"> The Type of Components to search for</typeparam>
/// <returns></returns>
public ImmutableArray<__Type> GetAll<__Type>() where __Type : Component {
Debug.LogAction("Searching for all Components on Docker", ["Type", "Docker"],
[typeof(__Type).ToString(), GetHashCode().ToString()]);
List<__Type> foundComponents = [];
//Iterates through the loop and returns if a match is found
foreach (Component component in (Component[])[.._Components]) {
if (component is __Type foundComponent) {
foundComponents.Add(foundComponent);
}
}
//Throws error if there is no Component found
if (foundComponents.Count == 0) {
Debug.LogError("Docker does not have target Component", ["Type", "Docker"],
[typeof(__Type).ToString(), GetHashCode().ToString()]);
return [];
}
Debug.LogState("Found Components on Docker", ["Components", "Type", "Docker"],
[(foundComponents.SelectMany(x => x.GetHashCode().ToString()) + "]").ToString(), typeof(__Type).ToString(), GetHashCode().ToString()]);
return [..foundComponents];
}
/// <summary>
/// Returns a bool based on if the Docker contains a Component of that type or not
/// </summary>
/// <typeparam name="__Type">Type of the Component</typeparam>
/// <returns></returns>
public bool Contains<__Type>() where __Type : Component => _Components.Any(x => x is __Type);
/// <summary>
/// Returns a bool based on if the current __Component is owned by this Docker
/// </summary>
/// <param name="__component"></param>
/// <returns></returns>
public bool Contains(Component __component) => _Components.Contains(__component);
/// <summary>
/// Destroys a Component attached to docker
/// </summary>
/// <param name="__component"></param>
public void Remove(Component __component) {
//Component is null
if (__component == null) {
Debug.LogError("Component is null", ["CurrentDocker"],
[GetHashCode().ToString()]); return;
}
//Docker doesn't have Component
if (!_Components.Contains(__component)) {
Debug.LogError("Docker does not have ownership of Component", ["Component", "Type", "CurrentDocker"],
[__component.GetHashCode().ToString(), __component.GetType().ToString(), GetHashCode().ToString()]); return;
}
__component.Destroy();
_Components.Remove(__component);
Debug.LogState("Successfully Destroyed Component", ["Component", "Type", "CurrentDocker"],
[__component.GetHashCode().ToString(), __component.GetType().ToString(), GetHashCode().ToString()]);
}
/// <summary>
/// Destroys the first found Component of a given type
/// </summary>
/// <typeparam name="__Type"> Type of Component to destroy</typeparam>
public void Remove<__Type>() where __Type : Component => Remove(Get<__Type>());
/// <summary>
/// Destroys all Components from a given collection.
/// </summary>
/// <param name="__Components"></param>
public void RemoveAll(IEnumerable<Component> __Components) { foreach (Component component in (Component[])[.._Components]) { Remove(component); } }
/// <summary>
/// Destroys all Components of a given type
/// </summary>
/// <typeparam name="__Type"></typeparam>
public void RemoveAll<__Type>() where __Type : Component => RemoveAll(GetAll<__Type>());
/// <summary>
/// Destroys all Components attached to Docker
/// </summary>
public void Clear() { foreach (Component component in (Component[])[.._Components]) { Remove(component); } }
}

View File

@@ -1,9 +1,9 @@
# Awperative Behaviors # Awperative Components
--- ---
Behaviors are the main innovation in Awperative's take on a modern, unbiased Components are the main innovation in Awperative's take on a modern, unbiased
**ECS** [(Entity Component System)](https://en.wikipedia.org/wiki/Entity_component_system); traditionally, **ECS** [(Entity Component System)](https://en.wikipedia.org/wiki/Entity_component_system); traditionally,
an Entity Component system involves 2/3 types of data. an Entity Component system involves 2/3 types of data.
@@ -27,7 +27,7 @@ these as Directories for components.
- **Scenes** are basically the worlds these objects inhabit. Common *synonyms* are Worlds or Levels. If GameObjects - **Scenes** are basically the worlds these objects inhabit. Common *synonyms* are Worlds or Levels. If GameObjects
are files in our analogy, then scenes are separate hard drives. The scene's jobs mainly center around being a are files in our analogy, then scenes are separate hard drives. The scene's jobs mainly center around being a
container. *(Rather than an object of functionality)* Docker. *(Rather than an object of functionality)*
**Keep in mind** that this is a general description of **other** Game Development Platforms. It's impossible to summarize **Keep in mind** that this is a general description of **other** Game Development Platforms. It's impossible to summarize
every single **ECS** in the world. every single **ECS** in the world.
@@ -38,28 +38,28 @@ As of this current version, Awperative's **ECS** has taken on a different form t
Parent Scene/World Parent Scene/World
Behaviors : Components :
Children Behaviors Children Components
One of the main **Awperative Principles** is **Generalization**; and during development it became clear One of the main **Awperative Principles** is **Generalization**; and during development it became clear
GameObjects are unnecessary, which caused them to be replaced by: the **Behavior**. GameObjects are unnecessary, which caused them to be replaced by: the **Component**.
**Behaviors** are a combination of the **GameObjects** and **Components** we discussed earlier. Awperative **Components** are a combination of the **GameObjects** and **Components** we discussed earlier. Awperative
does not implement many fancy features out of the box; because of that the traditionally useful GameObjects became does not implement many fancy features out of the box; because of that the traditionally useful GameObjects became
obsolete. Objects are also not built to be flexible like Components, leaving empty, nearly static objects floating in obsolete. Objects are also not built to be flexible like Components, leaving empty, nearly static objects floating in
our Scenes. our Scenes.
Because of this it was decided to make a more flexible type of entity that can act as GameObject and Component at once. Because of this it was decided to make a more flexible type of entity that can act as GameObject and Component at once.
However, Behaviors still do not implement many features out of the box, instead we use their **expandability** to our advantage. However, Components still do not implement many features out of the box, instead we use their **expandability** to our advantage.
## How To Use ## How To Use
Behaviors are rather easy to control, similar to Engines like Unity, you can make your own custom script by inheriting the abstract "**Behavior**" class. Components are rather easy to control, similar to Engines like Unity, you can make your own custom script by inheriting the abstract "**Component**" class.
public class MyScript : Behavior {} public class MyScript : Component {}
On the surface level, Behaviors provide you with your current scene and parents. On the surface level, Components provide you with your current scene and parents.
They also give very handy Game Events which are present in 99% of Game Development Platforms. They also give very handy Game Events which are present in 99% of Game Development Platforms.
@@ -80,79 +80,79 @@ They also give very handy Game Events which are present in 99% of Game Developme
code there; and vice versa for Draw. code there; and vice versa for Draw.
- Finally Create and Destroy are called when the Behavior is spawned In/Out. It should be noted that Create is called **after** the constructor. - Finally Create and Destroy are called when the Component is spawned In/Out. It should be noted that Create is called **after** the constructor.
If you try to make certain references or calls in the constructor it may not fully work, as the object is half instantiated. It is recommended to use Create when possible. Also, Destroy will not be called if the program is closed, just Unload. If you try to make certain references or calls in the constructor it may not fully work, as the object is half instantiated. It is recommended to use Create when possible. Also, Destroy will not be called if the program is closed, just Unload.
If you want to hook onto any of these methods it is quite simple using the override keyword. If you want to hook onto any of these methods it is quite simple using the override keyword.
public override void Update() {} public override void Update() {}
Putting this code inside any Behavior inheriting class, will create a method that gets called every single frame, just like that! Putting this code inside any Component inheriting class, will create a method that gets called every single frame, just like that!
For any further documentation, please refer to the API section of our glorious website! For any further documentation, please refer to the API section of our glorious website!
## Examples and Good Practice ## Examples and Good Practice
First let's see how we can recreate typical GameObject behavior. I would most recommend using **Nested Behaviors** to acheive this. First let's see how we can recreate typical GameObject Component. I would most recommend using **Nested Components** to acheive this.
If we pretend we have implemented a few modules for basic transform profiles and sprite management, then we can easily make a basic movable sprite object. If we pretend we have implemented a few modules for basic transform profiles and sprite management, then we can easily make a basic movable sprite object.
Like so : Like so :
Parent Scene/World Parent Scene/World
Empty Behavior : Empty Component :
Transform Behavior Transform Component
Sprite Behavior Sprite Component
We can expand upon this easily as well. Say we want to make it into a moveable player character, we can modify the Empty behavior to We can expand upon this easily as well. Say we want to make it into a moveable player character, we can modify the Empty Component to
carry some additional functionality. carry some additional functionality.
Parent Scene/World Parent Scene/World
Player Controller Behavior : <-- Player Controller Component : <--
Transform Behavior Transform Component
Sprite Behavior Sprite Component
If we want to give it a hitbox. If we want to give it a hitbox.
Parent Scene/World Parent Scene/World
Player Controller Behavior : Player Controller Component :
Transform Behavior Transform Component
Sprite Behavior Sprite Component
Hitbox Behavior <-- Hitbox Component <--
And maybe let's say we want to scale or offset that And maybe let's say we want to scale or offset that
Parent Scene/World Parent Scene/World
Player Controller Behavior : Player Controller Component :
Transform Behavior Transform Component
Sprite Behavior Sprite Component
Hitbox Behavior Hitbox Component
Transform Behavior <-- Transform Component <--
Of course, there is some additional programming that would be needed between each step. Of course, there is some additional programming that would be needed between each step.
**(Ex. Hitboxes listening to the child transform)**, but you can see how this data structure **(Ex. Hitboxes listening to the child transform)**, but you can see how this data structure
builds intuitively. builds intuitively.
I would recommend compartmentalizing any repeating pieces of code or types into a **Behavior**. It is also I would recommend compartmentalizing any repeating pieces of code or types into a **Component**. It is also
not immediately obvious at first, But I would say one of the largest utilities from an **object free component** system is the ability not immediately obvious at first, But I would say one of the largest utilities from an **object free component** system is the ability
to function at a high level in the scene. to function at a high level in the scene.
Often times in component-object **ECS**' you will have a static object/s that stores important one off Behaviors, such as the *Camera*, Often times in component-object **ECS**' you will have a static object/s that stores important one off Components, such as the *Camera*,
or the *Game's Asset Loader*. I've always found this to be unsatisfying. Luckily because Behaviors can operate as standalone objects or the *Game's Asset Loader*. I've always found this to be unsatisfying. Luckily because Components can operate as standalone objects
you can instead insert a standalone Camera Behavior into the scene. Which makes more logical and grammatical sense. you can instead insert a standalone Camera Component into the scene. Which makes more logical and grammatical sense.
Parent Scene/World Parent Scene/World
@@ -162,14 +162,14 @@ you can instead insert a standalone Camera Behavior into the scene. Which makes
## Under the Hood ## Under the Hood
As you've seen part of what makes **Behaviors** so great is the fact that they can nest within themselves infinitely. As you've seen part of what makes **Components** so great is the fact that they can nest within themselves infinitely.
This is possible because of an essential piece known as the **Docker**. This is possible because of an essential piece known as the **Docker**.
Dockers are seen everywhere in Awperative. They are built to store child Behaviors. The Behavior class carries a Docker like so. Dockers are seen everywhere in Awperative. They are built to store child Components. The Component class carries a Docker like so.
Behavior : Docker Component : Docker
Dockers also provide the Add, Get and Remove functions we all know and love, along with the list of child Behaviors. Dockers also provide the Add, Get and Remove functions we all know and love, along with the list of child Components.
It is also responsible for Awperative Events being passed through the Scene, for Example, an Update call would look like this It is also responsible for Awperative Events being passed through the Scene, for Example, an Update call would look like this
Scene -> Docker -> Component(Docker's child) Scene -> Docker -> Component(Docker's child)
@@ -178,54 +178,54 @@ It is also responsible for Awperative Events being passed through the Scene, for
Of course, the Update call would be redirected to a different spot if you were to override it, but the idea stays the same. Of course, the Update call would be redirected to a different spot if you were to override it, but the idea stays the same.
For more details, please look at Docker in the API and the file in Awperative! For more details, please look at Docker in the API and the file in Awperative!
## Specialized Behaviors ## Specialized Components
Because of its focus on **Expandability**, Awperative also allows **third-party** Behaviors to enter the Scene. Because of its focus on **Expandability**, Awperative also allows **third-party** Components to enter the Scene.
This allows for specialized behavior or streamlined development, if you are willing to make assumptions. This allows for specialized Component or streamlined development, if you are willing to make assumptions.
Let's imagine you are making an enemy for an RPG and your Behavior Layout looks somewhat like this Let's imagine you are making an enemy for an RPG and your Component Layout looks somewhat like this
Parent Scene/World Parent Scene/World
Enemy Pathfinding Behavior : Enemy Pathfinding Component :
Transform Behavior Transform Component
Sprite Behavior Sprite Component
Hitbox Behavior Hitbox Component
Health Behavior Health Component
UNIQUE BEHAVIOR UNIQUE Component
In this diagram, **UNIQUE BEHAVIOR** is just a placeholder for any future or enemy specific behaviors, and it is critical to our example. In this diagram, **UNIQUE Component** is just a placeholder for any future or enemy specific Components, and it is critical to our example.
And let's imagine that any time you add an enemy, then you will probably be adding some sort of "UNIQUE Behavior" there; And this unique behavior often And let's imagine that any time you add an enemy, then you will probably be adding some sort of "UNIQUE Component" there; And this unique Component often
uses aspects from the others present. uses aspects from the others present.
In a scenario like this, it would likely behoove you to create a specialized behavior type. As mentioned earlier, Behaviors are identified by inheriting the In a scenario like this, it would likely behoove you to create a specialized Component type. As mentioned earlier, Components are identified by inheriting the
abstract Behavior class. But it is possible to build an in-between class for additional functionality. abstract Component class. But it is possible to build an in-between class for additional functionality.
- Traditional Pattern - Traditional Pattern
Your Script : Behavior : Docker Your Script : Component : Docker
- Example Specialized Pattern - Example Specialized Pattern
Your Script : EnemyBehavior : Behavior : Docker Your Script : EnemyComponent : Component : Docker
As you can see we inherited through EnemyBehavior rather than Behavior. This is perfectly legal; and intended! As you can see we inherited through EnemyComponent rather than Component. This is perfectly legal; and intended!
You can do virtually anything in your specialized behavior in-between. I most recommend making use of **lambda** in situations like this. You can do virtually anything in your specialized Component in-between. I most recommend making use of **lambda** in situations like this.
For instance, you can provide simpler access to another Behavior like so For instance, you can provide simpler access to another Component like so
int Health => Parent.Get<Health>().Health; int Health => Parent.Get<Health>().Health;
Any future EnemyBehaviors can simply put "**Health**" and it will correctly retrieve the dynamic value. Any future EnemyComponents can simply put "**Health**" and it will correctly retrieve the dynamic value.
I should mention that this power comes with **great responsibility**. In this case: using EnemyBehavior without a Health Behavior I should mention that this power comes with **great responsibility**. In this case: using EnemyComponent without a Health Component
will cause logged errors, and possibly a runtime error/halt. will cause logged errors, and possibly a runtime error/halt.
--- ---

View File

@@ -0,0 +1,175 @@
using System.Collections.Generic;
using System.Collections.Immutable;
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 Component : ComponentDocker
{
/// <summary>
/// Current parent of the Component. Can be either Scene or another Component.
/// </summary>
public ComponentDocker ComponentDocker;
/// <summary>
/// Identifiers for Components.
/// </summary>
public HashSet<string> Tags;
/// <summary>
/// Order for when Components are called on. Only applies between Components on the same Docker.
/// </summary>
public int Priority;
/// <summary>
/// To be called when the Component is created.
/// </summary>
/// <param name="__parent"> Docker that this spawned in this Component</param>
internal void Initiate(ComponentDocker __parent) {
ComponentDocker = __parent;
Create();
}
/// <summary>
/// Called when the Game is Closing; does not always happen depending on if it is Force Closed.
/// </summary>
protected internal virtual void Unload() {}
/// <summary>
/// Called when the Game is Loading.
/// </summary>
protected internal virtual void Load() {}
/// <summary>
/// Called every frame before Draw, it is recommended to do any Non-Drawing update logic here.
/// </summary>
protected internal virtual void Update() {}
/// <summary>
/// Called after Update when the screen is being drawn. Please only put Drawing related logic here.
/// </summary>
protected internal virtual void Draw() {}
/// <summary>
/// Called when the Component is created.
/// </summary>
protected internal virtual void Create() {}
/// <summary>
/// Called when the Component is destroyed. Not called when the Game is closed.
/// </summary>
protected internal virtual void Destroy() {}
/// <summary>
/// Scene the Component resides in.
/// </summary>
public Scene Scene => __QueryScene();
protected Scene __QueryScene() {
if (ComponentDocker is Scene scene) return scene;
if (ComponentDocker is Component Component) return Component.__QueryScene();
return null;
}
/// <summary>
/// All parent Dockers and the parents of the parents up until the Scene. Will only list parents of parents, not uncle dockers.
/// </summary>
/// <remarks> Dockers[0] is the parent of this object, and Dockers[^1] is the Scene.</remarks>
public ImmutableArray<ComponentDocker> Dockers => __QueryDockers();
protected ImmutableArray<ComponentDocker> __QueryDockers() {
List<ComponentDocker> returnValue = [];
ComponentDocker currentComponentDocker = ComponentDocker;
while (!(currentComponentDocker is Scene)) {
if (currentComponentDocker is Component Component) {
returnValue.Add(currentComponentDocker);
currentComponentDocker = Component.ComponentDocker;
}
}
returnValue.Add(currentComponentDocker);
return [..returnValue];
}
/// <summary>
/// Returns the Parent Component. Will be null if the Component is under a scene.
/// </summary>
public Component Parent => __QueryParent();
protected Component __QueryParent() {
if (ComponentDocker is Component Component)
return Component;
return null;
}
/// <summary>
/// All parent Components and the parents of the parents up until the Scene. Will only list parents of parents, not uncle Components.
/// </summary>
public ImmutableArray<Component> Parents => __QueryComponents();
protected ImmutableArray<Component> __QueryComponents() {
List<Component> returnValue = [];
ComponentDocker currentComponentDocker = ComponentDocker;
while (!(currentComponentDocker is Scene))
if (currentComponentDocker is Component Component) {
returnValue.Add(Component);
currentComponentDocker = Component.ComponentDocker;
}
return [..returnValue];
}
}

View File

@@ -1,288 +0,0 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
namespace Awperative;
public abstract partial class Container
{
public ImmutableArray<Component> Behaviors => [.._behaviors];
internal HashSet<Component> _behaviors = [];
/// <summary>
/// Add a new Behavior to the Docker; This is the only way they should be created.
/// </summary>
/// <param name="__args"> Arguments to construct the Behavior with</param>
/// <typeparam name="Generic"> Type of Behavior to instantiate</typeparam>
/// <returns></returns>
public Component Add<Generic>(object[] __args) where Generic : Component {
//Log Action
Debug.LogAction("Adding Component to Docker", ["Type", "Args", "Docker"],
[typeof(Generic).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]", GetHashCode().ToString()]);
//Behavior does not have a constructor that matches the given args
if (typeof(Generic).GetConstructor((Type[])__args) == null)
{
Debug.LogError("Behavior cannot be constructed with the given arguments",
["Type", "Args"],
[typeof(Generic).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]"]); return null;
};
Component newComponent;
//Tries to instantiate behavior, and sends a fail call if an issue occurs.
try { newComponent = (Generic)Activator.CreateInstance(typeof(Generic), __args); }
catch {
Debug.LogError("Behavior creation failed!", ["Type", "Args", "Docker"],
[typeof(Generic).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]", GetHashCode().ToString()]); return null;
}
//If behavior is null do not add
if(newComponent == null) {
Debug.LogError("Activator created Null Behavior", ["Type", "Args", "Docker"],
[typeof(Generic).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]", GetHashCode().ToString()]); return null;
}
//Add to docker and initialize the new Behavior
_behaviors.Add(newComponent);
newComponent.Initiate(this);
//Logs successful action!
Debug.LogState("Successfully Created Behavior and Attached it to Docker", ["Type", "Args", "Docker", "Behavior"],
[typeof(Generic).ToString(), "[" + string.Join(", ", __args.SelectMany(x => x.ToString())) + "]", GetHashCode().ToString(), newComponent.GetHashCode().ToString()]);
return newComponent;
}
/// <summary>
/// Adds a new Behavior to the Docker; This is the only way they should be created.
/// </summary>
/// <typeparam name="Generic"></typeparam>
/// <returns></returns>
public Component Add<Generic>() where Generic : Component => Add<Generic>([]);
/// <summary>
/// Transfers a Behavior to another Docker
/// </summary>
/// <param name="component"> Component to move</param>
/// <param name="__container"> Container to move component to</param>
public void Transfer(Component __component, Container __container) {
Debug.LogAction("Transferring Component to Different Docker", ["Component", "Type", "CurrentDocker", "NewDocker"],
[__component.GetHashCode().ToString(), __component.GetType().ToString(), GetHashCode().ToString(), __container.GetHashCode().ToString()]);
if (!_behaviors.Contains(__component)) {
Debug.LogError("Docker does not have ownership of Behavior", ["Component", "Type", "CurrentDocker", "NewDocker"],
[__component.GetHashCode().ToString(), __component.GetType().ToString(), GetHashCode().ToString(), __container.GetHashCode().ToString()]); return; }
//Update docker lists
__container._behaviors.Add(__component);
_behaviors.Remove(__component);
//Update components parent
__component.Container = __container;
Debug.LogState("Successfully Transferred Component to a new Docker" , ["Component", "Type", "CurrentDocker", "NewDocker"],
[__component.GetHashCode().ToString(), __component.GetType().ToString(), GetHashCode().ToString(), __container.GetHashCode().ToString()]);
}
/// <summary>
/// Transfers the first found Behavior of a specific type to another Docker
/// </summary>
/// <param name="container"> Container to move component to</param>
/// <typeparam name="Generic"> Type of component</typeparam>
public void Transfer<Generic>(Container container) where Generic : Component =>
Transfer(Get<Generic>(), container);
/// <summary>
/// Transfers all Components in a list to another Container.
/// </summary>
/// <param name="__behaviors"> List of Components to transfer</param>
/// <param name="container"> Container to move Component to</param>
public void TransferAll(IEnumerable<Component> __behaviors, Container container) {
foreach (Component behavior in __behaviors) Transfer(behavior, container); }
/// <summary>
/// Transfers all Components of a type to another Container.
/// </summary>
/// <param name="container"> Target container</param>
/// <typeparam name="Generic"> Type of Components to transfer</typeparam>
public void TransferAll<Generic>(Container container) where Generic : Component => TransferAll(GetAll<Generic>(), container);
/// <summary>
/// Searches and returns the first Component of a type found on the Docker.
/// </summary>
/// <typeparam name="Generic"> The Type of Component to search for</typeparam>
/// <returns></returns>
public Component Get<Generic>() where Generic : Component {
Debug.LogAction("Searching for Component", ["Type", "Docker"],
[typeof(Generic).ToString(), GetHashCode().ToString()]);
//Iterates through the loop and returns if a match is found
foreach (Component component in _behaviors) {
if (component is Generic foundComponent) {
Debug.LogState("Found Component", ["Type", "Behavior", "Docker"],
[typeof(Generic).ToString(), foundComponent.GetHashCode().ToString(), GetHashCode().ToString()]);
return foundComponent;
}
}
//Throws error if there is no Component found
Debug.LogError("Docker does not have target Component", ["Type", "Docker"],
[typeof(Generic).ToString(), GetHashCode().ToString()]); return null;
}
/// <summary>
/// Searches and returns all Components of a type found on the Docker.
/// </summary>
/// <typeparam name="Generic"> The Type of Components to search for</typeparam>
/// <returns></returns>
public ImmutableArray<Component> GetAll<Generic>() where Generic : Component {
Debug.LogAction("Searching for all Components on Docker", ["Type", "Docker"],
[typeof(Generic).ToString(), GetHashCode().ToString()]);
List<Component> foundComponents = [];
//Iterates through the loop and returns if a match is found
foreach (Component component in _behaviors) {
if (component is Generic foundComponent) {
foundComponents.Add(foundComponent);
}
}
//Throws error if there is no Component found
if (foundComponents.Count == 0) {
Debug.LogError("Docker does not have target Component", ["Type", "Docker"],
[typeof(Generic).ToString(), GetHashCode().ToString()]);
return [];
}
Debug.LogState("Found Components on Docker", ["Components", "Type", "Docker"],
[(foundComponents.SelectMany(x => x.GetHashCode().ToString()) + "]").ToString(), typeof(Generic).ToString(), GetHashCode().ToString()]);
return foundComponents.ToImmutableArray();
}
/// <summary>
/// Destroys a Component attached to docker
/// </summary>
/// <param name="component"></param>
public void Destroy(Component component) {
//Component is null
if (component == null) {
Debug.LogError("Component is null", ["CurrentDocker"],
[GetHashCode().ToString()]); return;
}
//Docker doesn't have Component
if (!_behaviors.Contains(component)) {
Debug.LogError("Docker does not have ownership of Behavior", ["Component", "Type", "CurrentDocker"],
[component.GetHashCode().ToString(), component.GetType().ToString(), GetHashCode().ToString()]); return;
}
component.Destroy();
_behaviors.Remove(component);
}
public void Destroy<Generic>() where Generic : Component {
try
{
Component foundComponent = Get<Generic>();
foundComponent.Destroy();
_behaviors.Remove(foundComponent);
}catch { Debug.LogError("Removal failed"); }
}
public void DestroyAll<Generic>() where Generic : Component {
try {
foreach (Component component in GetAll<Generic>()) {
component.Destroy();
_behaviors.Remove(component);
}
}catch { Debug.LogError("Removal failed"); }
}
public void Remove(Component component)
{
if(!_behaviors.Contains(component)) { Debug.LogError("Body does not have a component of this type"); return; }
_behaviors.Remove(component);
}
public void Remove<Generic>() where Generic : Component {
try
{
Component foundComponent = Get<Generic>();
_behaviors.Remove(foundComponent);
}catch { Debug.LogError("Removal failed"); }
}
public void RemoveAll<Generic>() where Generic : Component {
try {
foreach (Component component in GetAll<Generic>()) {
_behaviors.Remove(component);
}
}catch { Debug.LogError("Removal failed"); }
}
}

View File

@@ -1,14 +0,0 @@
using System.Collections.Generic;
using System.Linq;
namespace Awperative;
/// <summary>
/// Base class for all Awperative entities, manages components as a requirement because that is the job of all entities.
/// </summary>
public abstract partial class Container
{
internal Scene DockerScene;
}

View File

@@ -1,19 +0,0 @@
using Microsoft.Xna.Framework;
namespace Awperative;
public abstract partial class Container
{
internal virtual void ChainUnload() { foreach (Component component in (Component[])[.._behaviors]) component.Unload(); }
internal virtual void ChainLoad() { foreach (Component component in (Component[])[.._behaviors]) { component.Load(); } }
internal virtual void ChainUpdate() { foreach (Component component in (Component[])[.._behaviors]) { component.Update(); } }
internal virtual void ChainDraw() { foreach (Component component in (Component[])[.._behaviors]) { component.Draw(); } }
internal virtual void ChainDestroy() { foreach(Component component in (Component[])[.._behaviors]) component.Destroy(); }
internal virtual void ChainCreate() { foreach (Component component in (Component[])[.._behaviors]) component.Create(); }
}

View File

@@ -6,7 +6,7 @@ using Microsoft.Xna.Framework;
namespace Awperative; namespace Awperative;
public sealed partial class Scene : Container public sealed partial class Scene : ComponentDocker
{ {
//todo: make useful lolol //todo: make useful lolol
} }

View File

@@ -6,9 +6,9 @@ cool lossless compressor to make my files look more complex
name save files something like ansf name save files something like ansf
//todo: spinny loady wheel, error graphic and make it so multiple scenes can be loaded and modularized, make it so behaviors can be enabled and disabled and merging scenes loading //todo: spinny loady wheel, error graphic and make it so multiple scenes can be loaded and modularized, make it so Components can be enabled and disabled and merging scenes loading
body tags, behavior and component tags search methods add a way to enforce one component between all scenes, behaviors and components upgrade base script body tags, Component and component tags search methods add a way to enforce one component between all scenes, Components and components upgrade base script
show colliders option show colliders option

View File

@@ -1,20 +1,20 @@
{ {
"format": 1, "format": 1,
"restore": { "restore": {
"/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj": {} "/home/avery/Programming/Awperative/Awperative/Awperative.csproj": {}
}, },
"projects": { "projects": {
"/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj": { "/home/avery/Programming/Awperative/Awperative/Awperative.csproj": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj", "projectUniqueName": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"projectName": "Awperative", "projectName": "Awperative",
"projectPath": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj", "projectPath": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"packagesPath": "/Users/averynorris/.nuget/packages/", "packagesPath": "/home/avery/.nuget/packages/",
"outputPath": "/Users/averynorris/RiderProjects/Awperative/Awperative/obj/", "outputPath": "/home/avery/Programming/Awperative/Awperative/obj/",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"configFilePaths": [ "configFilePaths": [
"/Users/averynorris/.nuget/NuGet/NuGet.Config" "/home/avery/.nuget/NuGet/NuGet.Config"
], ],
"originalTargetFrameworks": [ "originalTargetFrameworks": [
"net8.0" "net8.0"
@@ -32,13 +32,7 @@
"warnAsError": [ "warnAsError": [
"NU1605" "NU1605"
] ]
}, }
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "10.0.100"
}, },
"frameworks": { "frameworks": {
"net8.0": { "net8.0": {
@@ -61,22 +55,12 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.23, 8.0.23]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.23, 8.0.23]"
}
],
"frameworkReferences": { "frameworkReferences": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/10.0.102/PortableRuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/lib/dotnet/sdk/8.0.123/PortableRuntimeIdentifierGraph.json"
} }
} }
} }

View File

@@ -4,12 +4,12 @@
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess> <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/averynorris/.nuget/packages/</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/avery/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/averynorris/.nuget/packages/</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/avery/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">7.0.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.0</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/Users/averynorris/.nuget/packages/" /> <SourceRoot Include="/home/avery/.nuget/packages/" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -2,7 +2,7 @@
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect Component and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Awperative")] [assembly: System.Reflection.AssemblyCompanyAttribute("Awperative")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+44a9ce41f3fbfbf8cffaddb5d08041308b0f578c")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+843979e10b102dbae5dab3a082ccb2d1d20e571b")]
[assembly: System.Reflection.AssemblyProductAttribute("Awperative")] [assembly: System.Reflection.AssemblyProductAttribute("Awperative")]
[assembly: System.Reflection.AssemblyTitleAttribute("Awperative")] [assembly: System.Reflection.AssemblyTitleAttribute("Awperative")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
4c62c36f25605bdea7ac7277f2f36ad2d2ee5cd08efd68a2ab6eb48f091be658 72227f08b5781ddd9e5f497ab95377ff425e14c54db879ec9be1e644997e8e81

View File

@@ -1,7 +1,5 @@
is_global = true is_global = true
build_property.TargetFramework = net8.0 build_property.TargetFramework = net8.0
build_property.TargetFrameworkIdentifier = .NETCoreApp
build_property.TargetFrameworkVersion = v8.0
build_property.TargetPlatformMinVersion = build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb = build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids = build_property.ProjectTypeGuids =
@@ -10,8 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules = build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Awperative build_property.RootNamespace = Awperative
build_property.ProjectDir = /Users/averynorris/RiderProjects/Awperative/Awperative/ build_property.ProjectDir = /home/avery/Programming/Awperative/Awperative/
build_property.EnableComHosting = build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop = build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -273,19 +273,19 @@
] ]
}, },
"packageFolders": { "packageFolders": {
"/Users/averynorris/.nuget/packages/": {} "/home/avery/.nuget/packages/": {}
}, },
"project": { "project": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj", "projectUniqueName": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"projectName": "Awperative", "projectName": "Awperative",
"projectPath": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj", "projectPath": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"packagesPath": "/Users/averynorris/.nuget/packages/", "packagesPath": "/home/avery/.nuget/packages/",
"outputPath": "/Users/averynorris/RiderProjects/Awperative/Awperative/obj/", "outputPath": "/home/avery/Programming/Awperative/Awperative/obj/",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"configFilePaths": [ "configFilePaths": [
"/Users/averynorris/.nuget/NuGet/NuGet.Config" "/home/avery/.nuget/NuGet/NuGet.Config"
], ],
"originalTargetFrameworks": [ "originalTargetFrameworks": [
"net8.0" "net8.0"
@@ -303,13 +303,7 @@
"warnAsError": [ "warnAsError": [
"NU1605" "NU1605"
] ]
}, }
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "10.0.100"
}, },
"frameworks": { "frameworks": {
"net8.0": { "net8.0": {
@@ -332,22 +326,12 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.23, 8.0.23]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.23, 8.0.23]"
}
],
"frameworkReferences": { "frameworkReferences": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/10.0.102/PortableRuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/lib/dotnet/sdk/8.0.123/PortableRuntimeIdentifierGraph.json"
} }
} }
} }

View File

@@ -1,17 +1,15 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "ojSTLhU2/W4=", "dgSpecHash": "oHHZKOBBLTE=",
"success": true, "success": true,
"projectFilePath": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj", "projectFilePath": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"/Users/averynorris/.nuget/packages/monogame.framework.desktopgl/3.8.4.1/monogame.framework.desktopgl.3.8.4.1.nupkg.sha512", "/home/avery/.nuget/packages/monogame.framework.desktopgl/3.8.4.1/monogame.framework.desktopgl.3.8.4.1.nupkg.sha512",
"/Users/averynorris/.nuget/packages/monogame.library.openal/1.24.3.2/monogame.library.openal.1.24.3.2.nupkg.sha512", "/home/avery/.nuget/packages/monogame.library.openal/1.24.3.2/monogame.library.openal.1.24.3.2.nupkg.sha512",
"/Users/averynorris/.nuget/packages/monogame.library.sdl/2.32.2.1/monogame.library.sdl.2.32.2.1.nupkg.sha512", "/home/avery/.nuget/packages/monogame.library.sdl/2.32.2.1/monogame.library.sdl.2.32.2.1.nupkg.sha512",
"/Users/averynorris/.nuget/packages/nvorbis/0.10.4/nvorbis.0.10.4.nupkg.sha512", "/home/avery/.nuget/packages/nvorbis/0.10.4/nvorbis.0.10.4.nupkg.sha512",
"/Users/averynorris/.nuget/packages/system.memory/4.5.3/system.memory.4.5.3.nupkg.sha512", "/home/avery/.nuget/packages/system.memory/4.5.3/system.memory.4.5.3.nupkg.sha512",
"/Users/averynorris/.nuget/packages/system.valuetuple/4.5.0/system.valuetuple.4.5.0.nupkg.sha512", "/home/avery/.nuget/packages/system.valuetuple/4.5.0/system.valuetuple.4.5.0.nupkg.sha512"
"/Users/averynorris/.nuget/packages/microsoft.netcore.app.ref/8.0.23/microsoft.netcore.app.ref.8.0.23.nupkg.sha512",
"/Users/averynorris/.nuget/packages/microsoft.aspnetcore.app.ref/8.0.23/microsoft.aspnetcore.app.ref.8.0.23.nupkg.sha512"
], ],
"logs": [] "logs": []
} }

View File

@@ -1 +1 @@
"restore":{"projectUniqueName":"/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj","projectName":"Awperative","projectPath":"/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj","outputPath":"/Users/averynorris/RiderProjects/Awperative/Awperative/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"},"SdkAnalysisLevel":"10.0.100"}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"MonoGame.Framework.DesktopGL":{"suppressParent":"All","target":"Package","version":"[3.8.*, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"downloadDependencies":[{"name":"Microsoft.AspNetCore.App.Ref","version":"[8.0.23, 8.0.23]"},{"name":"Microsoft.NETCore.App.Ref","version":"[8.0.23, 8.0.23]"}],"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/local/share/dotnet/sdk/10.0.102/PortableRuntimeIdentifierGraph.json"}} "restore":{"projectUniqueName":"/home/avery/Programming/Awperative/Awperative/Awperative.csproj","projectName":"Awperative","projectPath":"/home/avery/Programming/Awperative/Awperative/Awperative.csproj","outputPath":"/home/avery/Programming/Awperative/Awperative/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"MonoGame.Framework.DesktopGL":{"suppressParent":"All","target":"Package","version":"[3.8.*, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/lib/dotnet/sdk/8.0.123/PortableRuntimeIdentifierGraph.json"}}

View File

@@ -1 +1 @@
17706725730840864 17711080279752479

View File

@@ -1 +1 @@
17706725730840864 17711080279752479