Esempio n. 1
0
        public PlayerAnimations(Player player, CharacterAnimator animator)
        {
            _player   = player;
            _animator = animator;

            _walkTag = animator.FindTag(WalkTagName);
        }
Esempio n. 2
0
        protected override void OnGameplayStart()
        {
            base.OnGameplayStart();

            //Add the required components first.
            _animator = Entity.GetOrCreateComponent <CharacterAnimator>();

            //Prepare the visuals of the player
            SetPlayerModel();

            //Set up the player animations, but only if the game is being played.
            _animations = new PlayerAnimations(this, _animator);

            // Now create the physical representation of the entity
            PrepareRigidbody();

            _playerView = new PlayerView(this);

            InitializeInput();

            PrepareWeapon();
        }