コード例 #1
0
ファイル: PlayerAnimations.cs プロジェクト: egrother/G_G_G
        public PlayerAnimations(Player player, CharacterAnimator animator)
        {
            _player   = player;
            _animator = animator;

            _walkTag = animator.FindTag(WalkTagName);
        }
コード例 #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();
        }