public PlayerAnimations(Player player, CharacterAnimator animator) { _player = player; _animator = animator; _walkTag = animator.FindTag(WalkTagName); }
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(); }