Exemple #1
0
        private void FixedUpdate()
        {
            if (wasAnimating && !animate.GetValue())
            {
                wasAnimating = false;
                levelHandler.AttemptPlayerSolution(currSpawner);
            }

            if (Input.GetMouseButton(0))
            {
                HandlePlayerClick();
            }
        }
Exemple #2
0
        void FixedUpdate()
        {
            if (arrowsHint != null)
            {
                arrowsHint.gameObject.SetActive(!animate.GetValue() && levelClickable.GetValue());
            }

            if (animate.GetValue())
            {
                transform.rotation *=
                    Quaternion.Euler(rotationVector * Time.fixedDeltaTime * rotateSpeed);
            }
        }
Exemple #3
0
        private void HandlePlayerClick()
        {
            // Ignore clicks if not allowed
            if (animate.GetValue() || !levelPlayable.GetValue())
            {
                return;
            }

            var clickRay = Camera.main.ScreenPointToRay(Input.mousePosition);

            if (Physics.Raycast(clickRay.origin, clickRay.direction, out var hit))
            {
                ClearOldTrail();
                StartTrail(hit);
            }
        }
 private void Update()
 {
     newGameButton.enabled = !animate.GetValue() && gameClickable.GetValue();
     buttonImage.enabled   = newGameButton.enabled;
     buttonText.enabled    = newGameButton.enabled;
 }