コード例 #1
0
        private void CreateSpectatorPlayer(string clientWorkerId, EntityId entityId)
        {
            var spectatorPlayerEntityTemplate = EntityTemplateFactory.CreateSpecatorPlayerTemplate(clientWorkerId);

            SpatialOS.Commands.CreateEntity(PlayerCreationWriter, entityId, SimulationSettings.SpectatorPlayerPrefabName, spectatorPlayerEntityTemplate)
            .OnFailure(failure => OnFailedPlayerCreation(failure, clientWorkerId, entityId, PlayerType.SPECTATORPLAYER));
        }