Пример #1
0
    void OnGUI()
    {
        if (_mto == null)
        {
            return;
        }
        int  bw        = Screen.width / 3;
        int  bh        = bw / 2;
        int  by        = Screen.height - bh;
        bool isPlaying = _mto.IsPlaying();

        if (GUI.Button(new Rect(0, by, bw, bh), isPlaying? "Pause" : "Play"))
        {
            if (isPlaying)
            {
                _mto.Pause();
            }
            else
            {
                _mto.Play();
            }
        }
        else if (GUI.Button(new Rect(bw, by, bw, bh), "Rewind"))
        {
            _mto.Rewind();
        }
    }
Пример #2
0
 public void Rewind()
 {
     if (mto == null)
     {
         return;
     }
     mto.Rewind();
 }