Skip to content

Commit 27e207b

Browse files
authored
Add files via upload
1 parent 3a55d35 commit 27e207b

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package armory.logicnode;
2+
3+
import iron.object.SpeakerObject;
4+
5+
class SetSoundNode extends LogicNode {
6+
7+
public function new(tree: LogicTree) {
8+
super(tree);
9+
}
10+
11+
override function run(from: Int) {
12+
var object: SpeakerObject = cast(inputs[1].get(), SpeakerObject);
13+
var sound: String = inputs[2].get();
14+
if (object == null || sound == null) return;
15+
object.setSound(sound);
16+
runOutput(0);
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package armory.logicnode;
2+
3+
import iron.object.SpeakerObject;
4+
5+
class SetVolumeSoundNode extends LogicNode {
6+
7+
public function new(tree: LogicTree) {
8+
super(tree);
9+
}
10+
11+
override function run(from: Int) {
12+
var object: SpeakerObject = cast(inputs[1].get(), SpeakerObject);
13+
if (object == null) return;
14+
object.setVolume(inputs[2].get());
15+
runOutput(0);
16+
}
17+
}

0 commit comments

Comments
 (0)