events hmmmm

This commit is contained in:
Ben
2021-08-14 01:44:46 +01:00
parent 03bf5c4a7d
commit a6fb1b2d11
4 changed files with 45 additions and 6 deletions

View File

@@ -7,7 +7,8 @@
namespace Aeon::Core {
class AppProperties {
class AppProperties
{
public:
std::string Name;
int Width, Height;

View File

@@ -1,5 +1,5 @@
#ifndef AEON_DISPLAY_H_
#define AEON_DISPLAY_H_
#ifndef AEON_CORE_DISPLAY_H_
#define AEON_CORE_DISPLAY_H_
namespace Aeon::Core {

View File

@@ -0,0 +1,35 @@
#ifndef AEON_CORE_ENGINEEVENTS_H_
#define AEON_CORE_ENGINEEVENTS_H_
/*
- events are typed and system'd
- systems can request to only receive events from a certain "system" category
- systems that dispatch events can create the event and register it as a type
- events are queued and non - blocking
- events propagate through game layers top - to - bottom
- once an event is flagged as handled by a receiving system,
it is discarded this is to prevent, say a "mouse click"
from propagating from the UI layer to the game layer
*/
namespace Aeon::Core {
enum EventSystem
{
};
class GenericEvent
{
};
class EventDispatcher
{
};
}
#endif

View File

@@ -1,11 +1,14 @@
// simple raycast shooter
// shotgun fun fun yanno
#include "Aeon/Aeon.hpp"
class ExampleGame : public Aeon::Core::App {
class ExampleGame : public Aeon::Core::App
{
public:
ExampleGame()
// take command line args better (parse them first!)
ExampleGame( int argc, char** argv )
: App( { "Game with AEON!" } )
{
@@ -20,5 +23,5 @@ public:
int main( int argc, char** argv )
{
ExampleGame game;
ExampleGame game(argc, argv);
}