Removed Initialize()
This commit is contained in:
@@ -6,7 +6,6 @@ namespace Awperative;
|
||||
|
||||
public sealed partial class Body
|
||||
{
|
||||
public void Initialize() { foreach (Component component in components) component.Initialize(); }
|
||||
public void Terminate() { foreach (Component component in components) component.Terminate(); }
|
||||
|
||||
public void Load() { foreach (Component component in components) { component.Load(); } }
|
||||
|
||||
@@ -5,10 +5,6 @@ namespace Awperative;
|
||||
|
||||
public sealed partial class Scene
|
||||
{
|
||||
public void Initialize() {
|
||||
foreach (Behavior behavior in behaviors) behavior.Initialize();
|
||||
foreach (Body body in bodies) body.Initialize();
|
||||
}
|
||||
|
||||
public void Terminate() {
|
||||
foreach (Behavior behavior in behaviors) behavior.Terminate();
|
||||
|
||||
@@ -8,15 +8,10 @@ public interface AwperativeHook
|
||||
/// <summary>
|
||||
/// Called when the program starts; It is not recommended you load assets here.
|
||||
/// </summary>
|
||||
public void Initialize() {}
|
||||
public void Load() {}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the program closes.
|
||||
/// </summary>
|
||||
public void Terminate() {}
|
||||
|
||||
/// <summary>
|
||||
/// Called when Awperative loads content.
|
||||
/// </summary>
|
||||
public void Load() {}
|
||||
}
|
||||
@@ -20,15 +20,14 @@ public sealed class Base : Game
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize() is called when the program starts. Override Initialize() in scripting tools or use hooks to call from this event.
|
||||
/// Initialize() is called when the program starts. It can be confusing because Initialize() in hooks and events is actually LoadContent().
|
||||
/// This is because Initialize() has little utility and there is no reason to
|
||||
/// </summary>
|
||||
/// <remarks> It is recommended not to load content in Initialize()</remarks>
|
||||
protected override void Initialize() {
|
||||
Awperative.ContentManager = Content;
|
||||
Awperative.SpriteBatch = new SpriteBatch(GraphicsDevice);
|
||||
|
||||
foreach (AwperativeHook hook in Awperative.EventHooks) hook.Initialize();
|
||||
foreach(Scene scene in Awperative.LoadedScenes) scene.Initialize();
|
||||
base.Initialize();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ public abstract class Behavior
|
||||
|
||||
|
||||
//GAME HAS JUST BEGUN/ended
|
||||
public virtual void Initialize() {}
|
||||
public virtual void Terminate() {}
|
||||
|
||||
//WE ARE LOADING STUFF
|
||||
|
||||
@@ -53,7 +53,6 @@ public abstract class Component
|
||||
|
||||
|
||||
//GAME HAS JUST BEGUN/ended
|
||||
public virtual void Initialize() {}
|
||||
public virtual void Terminate() {}
|
||||
|
||||
//WE ARE LOADING STUFF
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Awperative")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cc4fee7a34972940e4ce95a9723f222e7b5da0c2")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9f744fcd5f47a08f81587169de34e57d3562e7ba")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Awperative")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Awperative")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
2d568e09994fe2febaf13e7fef7bce0bbde41a896f4579f255b7f9a5481da9d3
|
||||
7a962b2fea56a4a2f915d2e475c1e494ec261a6791d7faf4c957d39c460317a6
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user