public sendScoreEvent ( string scoreEvent ) : void | ||
scoreEvent | string | |
Результат | void |
void checkForString() { switch (checkTestString) { case 0: songToPlayLeft = "Symphony.ogg"; break; case 1: songToPlayLeft = "Everyday.ogg"; break; case 2: songToPlayLeft = "Calvin.ogg"; break; case 3: songToPlayLeft = "Test.ogg"; break; case 4: songToPlayLeft = "Yellow.ogg"; break; case 5: songToPlayLeft = "TestPitch.ogg"; break; case 6: songToPlayLeft = "testingPitch.wav"; break; case 7: songToPlayLeft = "testingPitch.ogg"; break; case 8: songToPlayLeft = "Enigma.ogg"; break; case 9: songToPlayLeft = "LR.ogg"; break; default: print("pls select a song"); break; } //print("i199 0 1 \"" + Application.dataPath + "/Audio/" + songToPlayLeft + "\""); //csoundunity.setStringChannel ("SongPlay", songToPlayLeft); /*csoundunity.sendScoreEvent("i199 0 0.001 \"" + Application.dataPath + "/Audio/" + songToPlayLeft + "\"");*/ skipTimeS = " " + skipTime; csoundunity.sendScoreEvent("i199 0 0.001 \"" + Application.dataPath + "/Audio/" + songToPlayLeft + "\"" + skipTimeS); //csoundunity.sendScoreEvent("i1 0 -1"); }
public void OnMouseDown() { switch (isPlayingLeft) { case false: if (!triggered) { leftsource.Play(); csoundunity.sendScoreEvent("i1 0 -1"); } if (triggered) { //leftsource.pitch = 0.92f; leftsource.pitch = 1f; } isPlayingLeft = true; triggered = true; break; case true: //leftsource.pitch = 0f; csoundunity.setChannel("Time_Scaling", 0f); csoundunity.setChannel("Pitch", 0f); isPlayingLeft = false; break; } }