UUpdate Tutorials
This commit is contained in:
15
_tanks_networking/Sources/lnx/Player2Fire.hx
Normal file
15
_tanks_networking/Sources/lnx/Player2Fire.hx
Normal file
@ -0,0 +1,15 @@
|
||||
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();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user