public void Play <T>(T skit, double time = 0) where T : Enum { var idx = Convert.ToInt16(skit); var targetSkit = skits[idx]; if (CurrentSkit != targetSkit) { if (CurrentSkit == null) { currentSkit = (Skit)idx; } else { CurrentSkit.Stop(); CurrentSkit.enabled = false; currentSkit = (Skit)idx; } CurrentSkit.enabled = true; } if (time > 0.01f) { CurrentSkit.time = time; } CurrentSkit.Play(); }
public void Pause() { CurrentSkit.Pause(); }