Skip to content

Commit

Permalink
Beginning to add stuff for scripting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chukobyte committed May 3, 2021
1 parent 6e568c0 commit 93a3f69
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/core/scripting/script_context.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef SCRIPT_CONTEXT_H
#define SCRIPT_CONTEXT_H

#include "../ecs/entity/entity.h"
#include "../signal.h"

class ScriptContext {
public:
virtual ~ScriptContext() = default;
virtual CreateEntityInstance(Entity entity) = 0;
virtual void PhysicsProcess(Entity entity, float deltaTime) = 0;
virtual void Destroy() = 0;
virtual void ReceiveSubscribedSignal(Entity subscriberEntity, const std::string &subscriberFunctionName, SignalArguments args) = 0;
};

#endif //SCRIPT_CONTEXT_H
6 changes: 6 additions & 0 deletions src/core/signal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef SIGNAL_H
#define SIGNAL_H

struct SignalArguments {};

#endif //SIGNAL_H

0 comments on commit 93a3f69

Please sign in to comment.