From eb7415587912bcf879520fe0de5fb4bb0202e456 Mon Sep 17 00:00:00 2001 From: 0xA3 Date: Mon, 11 Jun 2018 13:08:42 +0200 Subject: [PATCH 1/2] changed ClassMap for Haxe 4 --- src/ash/ClassMap.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ash/ClassMap.hx b/src/ash/ClassMap.hx index 80bdf88..96b2694 100644 --- a/src/ash/ClassMap.hx +++ b/src/ash/ClassMap.hx @@ -45,6 +45,11 @@ class ClassMap, V> implements Map.IMap return valueMap.iterator(); } + public inline function copy():Map.IMap + { + return this.copy(); + } + public inline function toString():String { return valueMap.toString(); From 8b078b370ef2f14e973ae8fe73c99f62d5369e0a Mon Sep 17 00:00:00 2001 From: 0xA3 Date: Sat, 26 Jan 2019 15:06:58 +0100 Subject: [PATCH 2/2] added compatibility changes for Haxe 4 preview 5 --- src/ash/ClassMap.hx | 8 ++++++-- src/ash/core/Engine.hx | 4 ++-- src/ash/core/Entity.hx | 2 +- src/ash/core/NodeList.hx | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ash/ClassMap.hx b/src/ash/ClassMap.hx index 96b2694..3e9f072 100644 --- a/src/ash/ClassMap.hx +++ b/src/ash/ClassMap.hx @@ -2,7 +2,7 @@ package ash; import haxe.ds.StringMap; -class ClassMap, V> implements Map.IMap +class ClassMap, V> implements haxe.Constraints.IMap { var valueMap:StringMap = new StringMap(); // class name to value var keyMap:StringMap = new StringMap(); // class name to class @@ -45,7 +45,11 @@ class ClassMap, V> implements Map.IMap return valueMap.iterator(); } - public inline function copy():Map.IMap + public function keyValueIterator():KeyValueIterator { + return this.keyValueIterator(); + } + + public inline function copy():haxe.Constraints.IMap { return this.copy(); } diff --git a/src/ash/core/Engine.hx b/src/ash/core/Engine.hx index 4c933c2..53b7e15 100644 --- a/src/ash/core/Engine.hx +++ b/src/ash/core/Engine.hx @@ -10,8 +10,8 @@ import ash.signals.Signal1; */ class Engine { - public var entities(get_entities, never):Iterable; - public var systems(get_systems, never):Iterable; + public var entities(get, never):Iterable; + public var systems(get, never):Iterable; private var entityNames:Map; private var entityList:EntityList; diff --git a/src/ash/core/Entity.hx b/src/ash/core/Entity.hx index 9c3f5ad..7d3a611 100644 --- a/src/ash/core/Entity.hx +++ b/src/ash/core/Entity.hx @@ -28,7 +28,7 @@ class Entity /** * Optional, give the entity a name. This can help with debugging and with serialising the entity. */ - public var name(default, set_name):String; + public var name(default, set):String; /** * This signal is dispatched when a component is added to the entity. */ diff --git a/src/ash/core/NodeList.hx b/src/ash/core/NodeList.hx index 00961da..45cc054 100644 --- a/src/ash/core/NodeList.hx +++ b/src/ash/core/NodeList.hx @@ -101,7 +101,7 @@ class NodeList> /** * true if the list is empty, false otherwise. */ - public var empty(get_empty, never):Bool; + public var empty(get, never):Bool; private inline function get_empty():Bool {