6 m_TickTimer.Run(0.1,
this,
"OnGUITimer", NULL,
true);
9 override void OnUpdate(
float delta_time)
22 m_TickTimer.Run(0.1,
this,
"OnGUITimer", NULL,
true);
32 DbgUI.BeginCleanupScope();
33 DbgUI.Begin(
"Sound debug", 10, 10);
35 DbgUI.PushID_Str(
"SoundParams");
36 DbgUI.Text(
"SoundParams: ");
38 string soundsetName =
"BearGrowl_SoundSet";
39 DbgUI.InputText(
"", soundsetName, 200);
42 DbgUI.PushID_Str(
"Offset");
43 DbgUI.Text(
"Offset pos: ");
44 vector posOffset =
"0 0 0";
49 DbgUI.InputFloat(
"", posVal, 80);
51 posOffset[0] = posVal;
55 DbgUI.InputFloat(
"", posVal, 80);
57 posOffset[1] = posVal;
61 DbgUI.InputFloat(
"", posVal, 80);
63 posOffset[2] = posVal;
66 if(
DbgUI.Button(
"Create"))
70 m_soundObject = m_soundBuilder.BuildSoundObject();
74 DbgUI.Text(
"SoundObjectBuilder: ");
76 DbgUI.Text(
"SoundObject: ");
78 DbgUI.Text(
"AbstractWave: ");
80 vector posOffset2 =
"0 10 0";
82 if(m_soundParams != NULL)
84 DbgUI.Text(
"FadeInFactor: ");
86 DbgUI.PushID_Str(
"fadeIn");
87 DbgUI.InputFloat(
"", fadeInVolume, 80);
90 DbgUI.Text(
"FadeOutFactor: ");
92 DbgUI.PushID_Str(
"fadeOut");
93 DbgUI.InputFloat(
"", fadeOutVolume, 80);
96 DbgUI.PushID_Str(
"Offset2");
97 DbgUI.Text(
"Offset2 pos: ");
101 DbgUI.PushID_Int(100);
102 posVal2 = posOffset2[0];
103 DbgUI.InputFloat(
"", posVal2, 80);
105 posOffset2[0] = posVal2;
108 DbgUI.PushID_Int(101);
109 posVal2 = posOffset2[1];
110 DbgUI.InputFloat(
"", posVal2, 80);
112 posOffset2[1] = posVal2;
115 DbgUI.PushID_Int(102);
116 posVal2 = posOffset2[2];
117 DbgUI.InputFloat(
"", posVal2, 80);
119 posOffset2[2] = posVal2;
122 DbgUI.Text(
"skip: ");
125 DbgUI.PushID_Int(200);
126 DbgUI.InputFloat(
"", skip, 80);
129 if(
DbgUI.Button(
"Create and play"))
131 m_wave =
GetGame().GetSoundScene().Play3D(m_soundObject, m_soundBuilder);
132 m_wave.SetFadeInFactor(fadeInVolume);
140 DbgUI.Text(
"Wave length: " + m_wave.GetLength() +
"s");
143 DbgUI.Text(
"Volume: ");
146 DbgUI.InputFloat(
" ", volume, 80);
148 if(
DbgUI.Button(
"SetVolume"))
149 m_wave.SetVolume(volume);
151 if(
DbgUI.Button(
"SetVolumeRelative"))
152 m_wave.SetVolumeRelative(volume);
154 if(
DbgUI.Button(
"Play"))
156 if(
DbgUI.Button(
"Stop"))
158 if(
DbgUI.Button(
"Restart"))
160 if(
DbgUI.Button(
"Repeat"))
162 if(
DbgUI.Button(
"StopRepeat"))
164 if(
DbgUI.Button(
"Set position"))
169 DbgUI.EndCleanupScope();
178 float fadeInVolume = 1.1;
179 float fadeOutVolume = 0.9;