Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/ash/ClassMap.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package ash;

import haxe.ds.StringMap;

class ClassMap<K:Class<Dynamic>, V> implements Map.IMap<K, V>
class ClassMap<K:Class<Dynamic>, V> implements haxe.Constraints.IMap<K, V>
{
var valueMap:StringMap<V> = new StringMap<V>(); // class name to value
var keyMap:StringMap<K> = new StringMap<K>(); // class name to class
Expand Down Expand Up @@ -45,6 +45,15 @@ class ClassMap<K:Class<Dynamic>, V> implements Map.IMap<K, V>
return valueMap.iterator();
}

public function keyValueIterator():KeyValueIterator<K, V> {
return this.keyValueIterator();
}

public inline function copy():haxe.Constraints.IMap<K, V>
{
return this.copy();
}

public inline function toString():String
{
return valueMap.toString();
Expand Down
4 changes: 2 additions & 2 deletions src/ash/core/Engine.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import ash.signals.Signal1;
*/
class Engine
{
public var entities(get_entities, never):Iterable<Entity>;
public var systems(get_systems, never):Iterable<System>;
public var entities(get, never):Iterable<Entity>;
public var systems(get, never):Iterable<System>;

private var entityNames:Map<String, Entity>;
private var entityList:EntityList;
Expand Down
2 changes: 1 addition & 1 deletion src/ash/core/Entity.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ash/core/NodeList.hx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class NodeList<TNode:Node<TNode>>
/**
* 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
{
Expand Down