src/behavior.c

changeset 112
3e956c96dd6c
parent 111
ee4b58dfcf7f
--- a/src/behavior.c	Tue May 06 22:54:38 2025 +0200
+++ b/src/behavior.c	Tue May 06 23:04:54 2025 +0200
@@ -27,8 +27,10 @@
 
 #include "ascension/behavior.h"
 #include "ascension/error.h"
+#include "ascension/scene.h"
 
 #include <cx/array_list.h>
+#include <cx/tree.h>
 
 static void asc_behavior_destroy(void *b) {
     AscBehavior *behavior = b;
@@ -54,6 +56,7 @@
         asc_error("Failed to add behavior to scene node.");
         return NULL;
     }
+    behavior->enabled = true;
     behavior->node = node;
     behavior->func = args.func;
     behavior->destroy_func = args.destroy_func;

mercurial