[comon] remove change signal from engine

This commit is contained in:
2019-04-19 16:20:01 +03:00
parent a3f3de3af5
commit b86e0ddd20
6 changed files with 62 additions and 123 deletions

View File

@@ -42,9 +42,6 @@ class HumanControl extends Control {
}
case _:
}
if (event.keyCode == Keyboard.U) {
action(TankAction.UPGRADE);
}
}
private function onKeyUp(event:KeyboardEvent):Void {

View File

@@ -126,8 +126,6 @@ class Render extends SpriteView {
}
}
public function onChange(entity:EntityType, change:EntityChange):Void {}
public function onCollision(entity:EntityType, with:EntityType):Void {
switch [entity, with] {
case [BULLET(_), EAGLE(eagle)]:

View File

@@ -6,7 +6,6 @@ import flash.media.SoundChannel;
import flash.media.SoundTransform;
import openfl.utils.Assets;
import ru.m.tankz.core.EntityType;
import ru.m.tankz.engine.Engine;
import ru.m.tankz.Type;
class SoundManager {
@@ -85,22 +84,12 @@ class SoundManager {
}
}
public function onChange(entity:EntityType, change:EntityChange):Void {
switch [entity, change] {
case [TANK(_), HIT]:
play('bullet_hit');
//case [TANK(_), LIVE_UP]:
// play('live');
case [EAGLE(_), DEATH(_)]:
play('boom_player');
case _:
}
}
public function onCollision(entity:EntityType, with:EntityType):Void {
switch [entity, with] {
case [BULLET(_), CELL(cell)]:
//play('bullet_wall');
case [BULLET(_), EAGLE(_)]:
play('boom_player');
case _:
}
}