frankie-on-platform/armory3d/Sources/arm/Sound_amb.hx

28 lines
489 B
Haxe
Raw Normal View History

2022-07-24 16:34:50 +02:00
package arm;
class Sound_amb extends iron.Trait {
public function new() {
super();
// notifyOnInit(function() {
// });
notifyOnUpdate(function() {
var mouse = iron.system.Input.getMouse();
// Mouse clicked
if (mouse.started()) {
// Randomly play one of the three hit sounds
iron.data.Data.getSound('amb_bird_1.wav', function(sound:kha.Sound) {
iron.system.Audio.play(sound);
});
}
});
// notifyOnRemove(function() {
// });
}
}