Exemple #1
0
        public void Start()
        {
            MaxSpeed = Random.Range(8, 14);

            _state = State.Run;

            _playerMove = FindObjectOfType<Move>().gameObject;
            _rigidbody = GetComponent<Rigidbody>();

            _defaultLayer = gameObject.layer;
            _grabLayer = LayerMask.NameToLayer("Chaser-Grab");
            _stunnedLayer = LayerMask.NameToLayer("Chaser-Stun");

            _grabStamina = GrabStaminaMax;

            _cameraInput = Camera.main.GetComponent<CameraInput>();

            _animator = GetComponentInChildren<Animator>();
            _animator.Play("Walk");
            _defaultMesh = transform.FindChild("Mesh").gameObject;
            //_stunnedMesh = transform.FindChild("Mesh-Stunned").gameObject;

            //_defaultMesh.SetActive(true);
            //_stunnedMesh.SetActive(false);
        }
Exemple #2
0
    void Start()
    {
        _camera = Camera.main;
        _cameraMove = _camera.GetComponent<CameraMove>();
        _cameraInput = _camera.GetComponent<CameraInput>();
        _rigidbody = GetComponent<Rigidbody>();
        _player = GetComponent<Player>();
        _inputManger = InputManager.Instance;

        _mesh = transform.GetComponentInChildren<PlayerMesh>();

        _state = State.Run;
        _outstandingPush = null;

        _animator = gameObject.GetComponentInChildren<Animator>();
    }