SetScheduledEndTime() приватный Метод

private SetScheduledEndTime ( double time ) : void
time double
Результат void
Пример #1
0
	void SetupLoop() {
		sourceTwo = gameObject.AddComponent<AudioSource> ();
		sourceTwo.playOnAwake = false;
		sourceTwo.clip = songClip;
		sourceTwo.timeSamples = introEndInSamples;
		sourceTwo.PlayScheduled (introEndTime);
		sourceTwo.SetScheduledEndTime (nextLoopSwap);
		InvokeRepeating ("SwapLoop", (float) ((introEndInSamples * oneSampleInSeconds) + 1.0f), (float) loopTime);
	}
Пример #2
0
	// Use this for initialization
	void Awake() {
		sourceOne = gameObject.AddComponent<AudioSource> ();
		sourceOne.clip = songClip;
		oneSampleInSeconds = 1.0 / songClip.frequency;
		loopTime = loopInSamples * oneSampleInSeconds;
		introEndTime = AudioSettings.dspTime + (introEndInSamples * oneSampleInSeconds);
		nextLoopSwap = introEndTime + loopTime;
		sourceOne.PlayScheduled(AudioSettings.dspTime);
		sourceOne.SetScheduledEndTime (introEndTime);
		Invoke ("SetupLoop", 2.0f);
	}
Пример #3
0
 static public int SetScheduledEndTime(IntPtr l)
 {
     try {
         UnityEngine.AudioSource self = (UnityEngine.AudioSource)checkSelf(l);
         System.Double           a1;
         checkType(l, 2, out a1);
         self.SetScheduledEndTime(a1);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int SetScheduledEndTime(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.AudioSource obj = (UnityEngine.AudioSource)ToLua.CheckObject <UnityEngine.AudioSource>(L, 1);
         double arg0 = (double)LuaDLL.luaL_checknumber(L, 2);
         obj.SetScheduledEndTime(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }