basic ECS spawner
This commit is contained in:
20
addons/gecs/tests/systems/s_test_b.gd
Normal file
20
addons/gecs/tests/systems/s_test_b.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
class_name TestBSystem
|
||||
extends System
|
||||
|
||||
|
||||
func deps():
|
||||
return {
|
||||
Runs.After: [TestASystem], # Runs after SystemA
|
||||
Runs.Before: [TestCSystem], # This system rubs before SystemC
|
||||
}
|
||||
|
||||
|
||||
func query():
|
||||
return ECS.world.query.with_all([C_TestB])
|
||||
|
||||
|
||||
func process(entities: Array[Entity], components: Array, delta: float):
|
||||
for entity in entities:
|
||||
var a = entity.get_component(C_TestB)
|
||||
a.value += 1
|
||||
print("TestBSystem: ", a.value)
|
||||
Reference in New Issue
Block a user