Update leenkx/Sources/leenkx/logicnode/PlaySoundNode.hx
This commit is contained in:
		| @ -1,7 +1,7 @@ | ||||
| package leenkx.logicnode; | ||||
|  | ||||
| #if lnx_audio | ||||
| import iron.object.SpeakerObject; | ||||
|  | ||||
| #end | ||||
| class PlaySoundNode extends LogicNode { | ||||
|  | ||||
| 	public function new(tree: LogicTree) { | ||||
| @ -9,9 +9,11 @@ class PlaySoundNode extends LogicNode { | ||||
| 	} | ||||
|  | ||||
| 	override function run(from: Int) { | ||||
| 		#if lnx_audio | ||||
| 		var object: SpeakerObject = cast(inputs[1].get(), SpeakerObject); | ||||
| 		if (object == null) return; | ||||
| 		object.play(); | ||||
| 		#end | ||||
| 		runOutput(0); | ||||
| 	} | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user