Commit 27e207b 1 parent 3a55d35 commit 27e207b Copy full SHA for 27e207b
File tree 2 files changed +35
-0
lines changed
armory/Sources/armory/logicnode
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments