diff --git a/src/echoes/ComponentStorage.hx b/src/echoes/ComponentStorage.hx index 45d2c76..7cbc84a 100644 --- a/src/echoes/ComponentStorage.hx +++ b/src/echoes/ComponentStorage.hx @@ -58,7 +58,7 @@ class ComponentStorage { public inline function new(componentType:String) { this.componentType = componentType; - Echoes.componentStorage.push(this); + Echoes._componentStorage.push(this); //Some platforms get confused by the declaration of `Array>`, //and treat that as something like `Array`, and then cast to diff --git a/src/echoes/Echoes.hx b/src/echoes/Echoes.hx index 3af5ae8..df61add 100644 --- a/src/echoes/Echoes.hx +++ b/src/echoes/Echoes.hx @@ -23,7 +23,9 @@ class Echoes { #end @:allow(echoes.ComponentStorage) - private static final componentStorage:Array = []; + private static final _componentStorage:Array = []; + public static var componentStorage:ReadOnlyArray; + private static inline function get_componentStorage():ReadOnlyArray return _componentStorage; @:allow(echoes.Entity) private static final _activeEntities:Array = []; @@ -153,7 +155,7 @@ class Echoes { activeViews[i].reset(); } - for(storage in componentStorage) { + for(storage in _componentStorage) { storage.clear(); } EntityComponents.components.resize(0);