From ef9d4d0dcdebbd5ed314cb874e373031cae08438 Mon Sep 17 00:00:00 2001
From: realtradam
@@ -129,6 +130,11 @@
By using this pattern it allows programmers to easily control what an "object" or entity can do and how much data it needs to have. It avoids the issue of inhertance as no inhertance is ever required in this system. If you need a certain entity to have a certain functionality you just add the relevant component to it, and the systems that automatically go over specific components will give your entitiy the desired functionality.
-"But your framework also has Scenes and a Stage, what is that about?"
"But your framework also has Scenes, Stage, and Order, what is that about?"
The Stage is Scenes which are activated. This means any Scenes on the Stage are executed each frame, while the rest of the Systems are not.
+Order is a helper class which can set the priority of Scenes and Systems.
+FelFlame::Stage.call
+To set the order you just need to call FelFlame::Order.sort and pass Scenes or Systems in the parameters in the order you wish for them to execute
FelFlame::Order.sort(
+ @system1,
+ @system2,
+ @system3
+)
+
+
+If you want some Scenes or Systems to have the same priority then just pass them as an array:
+ +FelFlame::Order.sort(
+ @scene1,
+ [@scene2_1, @scene2_2],
+ @scene3
+)
+
+
There are some methods I haven't gone over in the overview. If you want to see everything and read in more detail check out the Documentation!
@@ -518,7 +550,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera. -- cgit v1.2.3