[comon] remove change signal from engine
This commit is contained in:
@@ -42,9 +42,6 @@ class HumanControl extends Control {
|
||||
}
|
||||
case _:
|
||||
}
|
||||
if (event.keyCode == Keyboard.U) {
|
||||
action(TankAction.UPGRADE);
|
||||
}
|
||||
}
|
||||
|
||||
private function onKeyUp(event:KeyboardEvent):Void {
|
||||
|
||||
@@ -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)]:
|
||||
|
||||
@@ -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 _:
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user