A simple .NET Framework to make 2D games quick and easy.

Fixed Fjord to work as an external binary

Changed files
+15 -12
src
+2 -2
src/Entity/Component.cs
··· 8 8 public SceneMouse Mouse = new(""); 9 9 public SceneInput Input = new(""); 10 10 11 - internal Entity ParentEntity = new(); 12 - public Scene ParentScene = default(Scene)!; 11 + public Entity ParentEntity { get; internal set; } = new(); 12 + public Scene ParentScene { get; internal set; } = default(Scene)!; 13 13 14 14 public float DeltaTime 15 15 {
+2
src/Entity/Entity.cs
··· 1 + using System.Numerics; 2 + 1 3 namespace Fjord.Scenes; 2 4 3 5 public class Entity
+10 -9
src/Input/GlobalInput.cs
··· 19 19 20 20 public static void Initialize() 21 21 { 22 - var assembly = Assembly.GetExecutingAssembly(); 22 + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); 23 + foreach(var assembly in assemblies) { 24 + var derivedTypes = assembly.GetTypes().Where(t => 25 + t != typeof(InputAction) && 26 + typeof(InputAction).IsAssignableFrom(t)); 23 27 24 - var derivedTypes = assembly.GetTypes().Where(t => 25 - t != typeof(InputAction) && 26 - typeof(InputAction).IsAssignableFrom(t)); 27 - 28 - foreach (var type in derivedTypes) 29 - { 30 - var action = Activator.CreateInstance(type) as InputAction; 31 - _register(action!); 28 + foreach (var type in derivedTypes) 29 + { 30 + var action = Activator.CreateInstance(type) as InputAction; 31 + _register(action!); 32 + } 32 33 } 33 34 } 34 35
+1 -1
src/Scenes/Scene.cs
··· 42 42 43 43 public bool MouseInsideScene { get; internal set; } 44 44 45 - internal List<Entity> Entities = new(); 45 + public List<Entity> Entities { get; internal set; } = new(); 46 46 internal List<Entity> removeEntity = new(); 47 47 48 48 internal List<Entity> RegisterEntityBacklog = new();