Exemple #1
0
        private void Move()
        {
            float step = _moveSpeed * Time.deltaTime;

            transform.position = Vector3.MoveTowards(transform.position, _newLocation, step);

            if (_newLocation == transform.position && _movementFinished)
            {
                _cameraEffect = false;
                _playerInput.DisableControls(false);
            }

            if (transform.position == _newLocation && !_movementFinished)
            {
                StartCoroutine(ShowTimer(_showForSeconds));
                GauntletScript script = FindObjectOfType <GauntletScript>();
                script.OpenDoor();
            }
        }
Exemple #2
0
 // Use this for initialization
 private void Awake()
 {
     _gauntlet = FindObjectOfType <GauntletScript>();
     _trigger  = GameObject.Find("GauntletTrigger");
 }