Merge branch 'develop' of bitbucket.org:infernalgames/tankz into develop

This commit is contained in:
2018-02-16 17:59:22 +03:00
2 changed files with 6 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "tankz",
"version": "0.6.1",
"version": "0.6.2",
"private": true,
"devDependencies": {
"ansi-colors": "^1.0.1",

View File

@@ -67,7 +67,8 @@ class CollisionProcessor implements EngineListener {
public function onDestroy(entity:EntityType):Void { }
}
@:yield
@:build(yield.parser.Parser.run())
//@:yield //ToDo: not working
class Engine implements ControlHandler {
public var config(default, default):Config;
@@ -225,8 +226,9 @@ class Engine implements ControlHandler {
public function iterTanks(filter:Tank->Bool):Iterator<Tank> {
for (entity in entities) {
if (Std.is(entity, Tank) && filter(entity)) {
@yield return entity;
var tank:Tank = EntityTypeResolver.as(entity, Tank);
if (tank != null && filter(tank)) {
@yield return tank;
}
}
}