Search the Community
Showing results for tags 'AmbientSource'.
-
Hi The sounds is not playing, why ? What wrong with the following code? init() { setUpScreen(); } void setUpScreen() { gameRunVideoBground = new WidgetSpriteVideo(gui, engine.getDataPath() + "videos/gamebackground/" + gamebackgroundVids[videoNumberGameBg]); gameRunVideoBground.addLayer(); gameRunVideoBground.setOrder(1); gui.addChild(gameRunVideoBground,GUI_ALIGN_EXPAND); gameRunSoundBground = new AmbientSource(engine.getDataPath() + "videos/gamebackground/" + gamebackgroundVids[videoNumberGameBg]); gameRunVideoBground.setAmbientSource(gameRunSoundBground); } then in update update() { if(gameRunVideoBground != NULL && gameRunVideoBground.isPlaying() == 0 && state == 3 && state3Played == 1) { gameRunVideoBground.setVideoTime(0.01f); gameRunSoundBground.setLoop(1); gameRunSoundBground.play(); gameRunVideoBground.play(); }
-
Hi guys, I want to store object/instance of an "AmbientSource" Class on CPP side to track all objects on CPP side. We are saving all objects/instances of "Node" class on CPP side using "Unigine::Variable", is it possible to use same for "AmbientSource" Class ? Thanks rakeshj.