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() { // }); } }