Пример #1
0
	public void pauseTime(bool force=false)
	{
		if (force || _tutMan.getState () == TutorialManager.STATES.END) {
			Debug.Log ("Time Paused");
			if (!isOnPause ()) {
				_currentMode = SPEED_MODE.PAUSE;
				onTimeMultiplierChange ();
			}
		}
	}
Пример #2
0
    public void init()
	{
		_tutMan = GameObject.FindGameObjectWithTag ("Tutorial").GetComponent<TutorialManager> ();
        calendar = new Calendar();
		_currentMode = SPEED_MODE.NORMAL;
        _timeMultiplier = new float[4] { 0.0f, 1.0f, 2.0f, 3.0f };
        _currentTimeMultiplier = _timeMultiplier[(uint)_currentMode];
		_timePerDay = 1.0f;
        _currentHour = 0;
        _timePerHour = _timePerDay / 24.0f;
		_elapsedTime = 0.0f;
		updateUI ();
    }
Пример #3
0
	public void changeMode(SPEED_MODE mode)
	{
		if (mode == SPEED_MODE.PAUSE && !isOnPause()) {
			switchPauseTime();
		}
		else  {
			if (isOnPause()) {
				switchPauseTime();
			}
			_currentMode = mode;
			this.onTimeMultiplierChange();
		}
	}