16 lines
330 B
Haxe
16 lines
330 B
Haxe
|
|
package lnx;
|
||
|
|
|
||
|
|
class Player2Fire extends iron.Trait {
|
||
|
|
public function new() {
|
||
|
|
super();
|
||
|
|
|
||
|
|
notifyOnUpdate(function() {
|
||
|
|
var keyboard = iron.system.Input.getKeyboard();
|
||
|
|
|
||
|
|
if (keyboard.started("f")) {
|
||
|
|
object.getTrait(FireTrait).fire();
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|