wooo stuff yay

This commit is contained in:
kin fuyuki 2026-02-20 02:29:05 -03:00
commit d1bb9d8c67
No known key found for this signature in database
GPG key ID: 0E4E8E519FB71401
91 changed files with 17403 additions and 42 deletions

40
engine/src/scenes/scene.h Normal file
View file

@ -0,0 +1,40 @@
#pragma once
#include "nodes.h"
#include "node2d.h"
#include "node2drelative.h"
#include <list>
namespace enginend {
struct scene{
std::list<enginend::nodes::node*> nodes;
virtual void boot() {
int i=0;
tiny::echo((char*)"initializing scene");
for (enginend::nodes::node* n : nodes) {
tiny::echo((char*)"initializing object of ID: %i",i++);
n->boot();
}
}
virtual void draw() {
ClearBackground(rl::BLANK);
BeginDrawing();
for (enginend::nodes::node* n : nodes) {
n->draw();
}
EndDrawing();
}
virtual void tick() {
for (enginend::nodes::node* n : nodes) {
n->tick();
}
}
virtual void exit() {
for (enginend::nodes::node* n : nodes) {
n->exit();
}
}
};
}