Exemplo n.º 1
0
    void Start()
    {
        GlobalTime.Time = 0;
        timeChangeEvent = new GoToTimeState();
        pauseEvent      = new PauseEvent();

        EventManager.AddTimeChangeInvoker(this);
        EventManager.AddPauseTimeInvoker(this);
    }
Exemplo n.º 2
0
 /// <summary>
 /// What happens when we change the value in the scrollbar
 /// </summary>
 /// <param name="value">float</param>
 void OnTimeBarChangeValue(float value)
 {
     if (!Input.GetMouseButton(0))
     {
         float timeStamp = GlobalTime.Time * value;
         timeStamp = float.Parse(timeStamp.ToString("0.0"));
         timeChangeEvent.Invoke(timeStamp);
         // print("timeStamp " + timeStamp);
         timeChangeEvent = new GoToTimeState();
         EventManager.AddTimeChangeInvoker(this);
         tempGlobalTime   = timeStamp;
         timeCounter.text = "Playback time: " + timeStamp.ToString("0.0");
         newGlobalTime    = true;
     }
 }