Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chukobyte committed Oct 8, 2024
1 parent 90d85a8 commit ebf5c5e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions engine/src/core/scripting/script_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ typedef void (*OnFixedUpdateInstance) (SkaEntity, f32);

typedef void (*OnNetworkCallback) (const char*);

typedef void (*OnScriptContextInit) (struct CREScriptContext*);
typedef void (*OnScriptContextFinalize) (struct CREScriptContext*);

// TODO: Make network callbacks not specific to python
struct _object; // PyObject
typedef void (*OnEntitySubscribeToNetworkCallback) (SkaEntity, struct _object*, const char*);
Expand All @@ -40,9 +37,9 @@ typedef enum CreScriptContextType {
// Also check out other script contexts for examples.
typedef struct CREScriptContext {
// Called when the script context is created
OnScriptContextInit on_script_context_init;
void (*on_script_context_init)(struct CREScriptContext*);
// Called when the script context is destroyed
OnScriptContextFinalize on_script_context_finalize;
void (*on_script_context_finalize)(struct CREScriptContext*);
// Called when a new entity instance is requested to be created once a node has entered the scene.
// If using the same function to dynamically create instance from the script side, be sure to check if the instance
// Isn't already created
Expand Down Expand Up @@ -71,6 +68,9 @@ typedef struct CREScriptContext {
SkaEntity fixedUpdateEntities[SKA_MAX_ENTITIES];
} CREScriptContext;

typedef void (*OnScriptContextInit) (struct CREScriptContext*);
typedef void (*OnScriptContextFinalize) (struct CREScriptContext*);

typedef struct CREScriptContextTemplate {
CreScriptContextType contextType;
OnScriptContextInit on_script_context_init;
Expand Down

0 comments on commit ebf5c5e

Please sign in to comment.