示例#1
0
 void Awake()
 {
     _playing        = true;
     _isInTurbo      = false;
     _gridCtrl       = GetComponent <GridCtrl>();
     _inputCtrl      = GetComponent <InputCtrl>();
     _rowRemover     = GetComponent <RowRemover>();
     _fallRoutine    = FallAndWait();
     _speedUpRoutine = SpeedUpOverTime();
 }
        private void Pause()
        {
            Time.timeScale = TimeIsPaused() ? 1 : 0;
            OnGamePause?.Invoke(TimeIsPaused());

            if (TimeIsPaused())
            {
                InputCtrl.On();
            }
        }
示例#3
0
 void Awake()
 {
     _playing = true;
     _isInTurbo = false;
     _gridCtrl = GetComponent<GridCtrl>();
     _inputCtrl = GetComponent<InputCtrl>();
     _rowRemover = GetComponent<RowRemover>();
     _fallRoutine = FallAndWait();
     _scoreView = GameObject.Find("text_ScoreValue").GetComponent<TextMesh>();
 }
示例#4
0
    void Update()
    {
        if (SceneController.Ellic_Current.ShootCtrl.Able_Fire)
        {
            // active a skill
            if (!Any_skill_running)
            {
                if (!this.is_Reloading && (InputCtrl.IsHotKeyDown(hotKey) || InputCtrl.IsHotKeyDown(joyHotKey)))
                {
                    this.is_working   = true;
                    Any_skill_running = true;

                    this.UIObj.transform.Find("Active").gameObject.SetActive(true);
                    this.timeLeft = this.timeTotal;
                }
            }

            // running

            if (this.is_working)
            {
                this.timeLeft -= Time.deltaTime;
                if (this.timeLeft < 0.0f)
                {
                    this.is_working   = false;
                    Any_skill_running = false;
                    this.UIObj.transform.Find("Active").gameObject.SetActive(false);

                    this.is_Reloading   = true;
                    this.reloadTimeLeft = this.reloadTimeTotal;
                }
            }


            // reloading
            if (this.is_Reloading)
            {
                this.reloadTimeLeft -= Time.deltaTime;
                if (this.reloadTimeLeft <= 0.0f)
                {
                    this.is_Reloading   = false;
                    this.reloadTimeLeft = 0.0f;
                }
                this.UIObj.transform.Find("Mask").GetComponent <RectTransform>().localScale =
                    new Vector3(1.0f, this.reloadTimeLeft / this.reloadTimeTotal, 1.0f);
            }
        }
    }
示例#5
0
 void Awake()
 {
     _input = GetComponent<InputCtrl>();
 }
示例#6
0
 void Awake()
 {
     _input = GetComponent <InputCtrl>();
 }
示例#7
0
 private void Awake()
 {
     context = this;
 }
 protected override void OnAwake()
 {
     this.characterCtrl = this.GetComponent <CharacterController>();
     this.m_Input       = InputCtrl.Instance;
 }
 private void Awake()
 {
     this.m_Input     = InputCtrl.Instance;
     Cursor.lockState = CursorLockMode.Locked;
     Cursor.visible   = false;
 }