Exemple #1
0
        public override void SingleExecute(PlayerEntity player)
        {
            AssetManager.LoadAssetAsync(
                player,
                AssetConfig.GetCharacterModelAssetInfo(player.playerInfo.RoleModelId),
                _p3Handler.OnLoadSucc);

            if (player.isFlagSelf && HasFirstPerson(player.playerInfo.RoleModelId))
            {
                AssetManager.LoadAssetAsync(
                    player,
                    AssetConfig.GetCharacterHandAssetInfo(player.playerInfo.RoleModelId),
                    _p1Handler.OnLoadSucc);
            }

            var audioController = player.AudioController();

            if (audioController != null)
            {
                audioController.LoadMapAmbient(AssetManager);
            }
            Logger.InfoFormat("CharacterLog-- created client player entity {0}, id:{1}, avatarIds:{2}", player.entityKey,
                              player.playerInfo.RoleModelId,
                              string.Join(",", player.playerInfo.AvatarIds.Select(i => i.ToString()).ToArray()));
        }
        public override void SingleExecute(PlayerEntity player)
        {
            AssetManager.LoadAssetAsync(
                player,
                AssetConfig.GetCharacterModelAssetInfo(player.playerInfo.ModelName),
                _p3Handler.OnLoadSucc);

            if (player.isFlagSelf)
            {
                AssetManager.LoadAssetAsync(
                    player,
                    AssetConfig.GetCharacterHandAssetInfo(player.playerInfo.ModelName),
                    _p1Handler.OnLoadSucc);
            }

            _logger.InfoFormat("created client player entity {0}", player.entityKey);
        }
Exemple #3
0
        public override void SingleExecute(PlayerEntity player)
        {
            LoadRequestManager.AppendLoadRequest(
                player,
                AssetConfig.GetCharacterModelAssetInfo(player.playerInfo.ModelName),
                _p3Handler.OnLoadSucc);
            LoadRequestManager.AppendLoadRequest(player, AssetConfig.GetCharacterHitboxAssetInfo(player.playerInfo.ModelName), new HitboxLoadResponseHandler().OnLoadSucc);
            if (player.isFlagSelf)
            {
                LoadRequestManager.AppendLoadRequest(
                    player,
                    AssetConfig.GetCharacterHandAssetInfo(player.playerInfo.ModelName),
                    _p1Handler.OnLoadSucc);
            }

            _logger.InfoFormat("created client player entity {0}", player.entityKey);
        }
Exemple #4
0
        private void LoadModelAsset(PlayerEntity player)
        {
            AssetManager.LoadAssetAsync(
                player,
                AssetConfig.GetCharacterModelAssetInfo(player.playerInfo.RoleModelId),
                P3ModelLoadSuccess);

            if (player.isFlagSelf && HasFirstPerson(player.playerInfo.RoleModelId))
            {
                AssetManager.LoadAssetAsync(
                    player,
                    AssetConfig.GetCharacterHandAssetInfo(player.playerInfo.RoleModelId),
                    P1ModelLoadSuccess);
            }

            Logger.InfoFormat("new client player entity {0}, id:{1}, avatarIds:{2}", player.entityKey,
                              player.playerInfo.RoleModelId,
                              string.Join(",", player.playerInfo.AvatarIds.Select(i => i.ToString()).ToArray()));
        }
Exemple #5
0
        public override void SingleExecute(PlayerEntity player)
        {
            AssetManager.LoadAssetAsync(
                player,
                AssetConfig.GetCharacterModelAssetInfo(player.playerInfo.ModelName),
                _p3Handler.OnLoadSucc);

            if (player.isFlagSelf)
            {
                AssetManager.LoadAssetAsync(
                    player,
                    AssetConfig.GetCharacterHandAssetInfo(player.playerInfo.ModelName),
                    _p1Handler.OnLoadSucc);
            }

            _logger.InfoFormat("created client player entity {0}, modelName:{1}, id:{2}, avatarIds:{3}", player.entityKey, player.playerInfo.ModelName,
                               player.playerInfo.RoleModelId,
                               string.Join(",", player.playerInfo.AvatarIds.Select(i => i.ToString()).ToArray()));
        }