Merge branch 'develop' of bitbucket.org:infernalgames/tankz into develop
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tankz",
|
"name": "tankz",
|
||||||
"version": "0.6.1",
|
"version": "0.6.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ansi-colors": "^1.0.1",
|
"ansi-colors": "^1.0.1",
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ class CollisionProcessor implements EngineListener {
|
|||||||
public function onDestroy(entity:EntityType):Void { }
|
public function onDestroy(entity:EntityType):Void { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@:yield
|
@:build(yield.parser.Parser.run())
|
||||||
|
//@:yield //ToDo: not working
|
||||||
class Engine implements ControlHandler {
|
class Engine implements ControlHandler {
|
||||||
|
|
||||||
public var config(default, default):Config;
|
public var config(default, default):Config;
|
||||||
@@ -225,8 +226,9 @@ class Engine implements ControlHandler {
|
|||||||
|
|
||||||
public function iterTanks(filter:Tank->Bool):Iterator<Tank> {
|
public function iterTanks(filter:Tank->Bool):Iterator<Tank> {
|
||||||
for (entity in entities) {
|
for (entity in entities) {
|
||||||
if (Std.is(entity, Tank) && filter(entity)) {
|
var tank:Tank = EntityTypeResolver.as(entity, Tank);
|
||||||
@yield return entity;
|
if (tank != null && filter(tank)) {
|
||||||
|
@yield return tank;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user