Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     TaskMenuController.instance.evt_taskprogressed.AddListener(FinalLoopTaskComplete);
     //memoryPuzzle.evt_puzzleSuccess.AddListener (ProgressTask);
     //memoryPuzzle.evt_puzzleFailed.AddListener (FailTask);
     //yield return new WaitForSeconds (0.1f);
     if (ES3.KeyExists("LDJam47_HasSaved"))
     {
         //ActionWaiter (1f, new System.Action (() => InkWriter.main.GoToKnot ("daily_cycle")));
         currentLevel   = ES3.Load <int> ("LDJam47_CurrentLevel");
         currentXP      = ES3.Load <float> ("LDJam47_CurrentXP");
         levelText.text = "Level " + currentLevel;
         mainXPProgressor.SetProgress(currentXP);
     }
 }
Example #2
0
 private void ToggleOnValueChanged(bool value)
 {
     m_previousValue = IsOn;
     OnValueChanged.Invoke(IsOn);
     if (ToggleProgressor != null)
     {
         ToggleProgressor.SetProgress(IsOn ? 1 : 0);
     }
 }
Example #3
0
    // Update is called once per frame
    protected virtual void Update()
    {
        if (cardState == ActionCardState.doing)
        {
            currentTime += Time.deltaTime;

            progressor.SetProgress(currentTime / selectedActionInfo.timeCost);
            if (currentTime >= selectedActionInfo.timeCost)
            {
                cardState = ActionCardState.done;
                collectButton.SetActive(true);
            }
            else
            {
            }
        }
    }
Example #4
0
        private void Update()
        {
            if (m_previousValue != IsOn)
            {
                m_previousValue = IsOn;
                OnValueChanged.Invoke(IsOn);
                if (ToggleProgressor != null)
                {
                    ToggleProgressor.SetProgress(IsOn ? 1 : 0);
                }
            }

            if (InputData.InputMode == InputMode.None)
            {
                return;
            }

            if (!IsSelected)
            {
                return;
            }

            // ReSharper disable once SwitchStatementMissingSomeCases
            switch (InputData.InputMode)
            {
            case InputMode.KeyCode:
                if (UnityEngine.Input.GetKeyDown(InputData.KeyCode) ||
                    InputData.EnableAlternateInputs && UnityEngine.Input.GetKeyDown(InputData.KeyCodeAlt))
                {
                    ExecuteClick();
                }

                break;

            case InputMode.VirtualButton:
                if (UnityEngine.Input.GetButtonDown(InputData.VirtualButtonName) ||
                    InputData.EnableAlternateInputs && UnityEngine.Input.GetButtonDown(InputData.VirtualButtonNameAlt))
                {
                    ExecuteClick();
                }

                break;
            }
        }