protected override void HandleWorkerConnectionEstablished() { PlayerLifecycleHelper.AddClientSystems(Worker.World); TransformSynchronizationHelper.AddClientSystems(Worker.World); GameObjectRepresentationHelper.AddSystems(Worker.World); GameObjectCreationHelper.EnableStandardGameObjectCreation(Worker.World); }
public static void AddClientSystems(World world) { AddLifecycleSystems(world); TransformSynchronizationHelper.AddClientSystems(world); PlayerLifecycleHelper.AddClientSystems(world); GameObjectCreationHelper.EnableStandardGameObjectCreation(world); }
protected override void HandleWorkerConnectionEstablished() { PlayerLifecycleHelper.AddClientSystems(Worker.World); TransformSynchronizationHelper.AddClientSystems(Worker.World); IEntityGameObjectCreator fallbackCreator = new GameObjectCreatorFromMetadata(Worker.WorkerType, Worker.Origin, Worker.LogDispatcher); IEntityGameObjectCreator customCreator = new PlayerGameObjectCreator(fallbackCreator, Worker.World, Worker.WorkerType); GameObjectCreationHelper.EnableStandardGameObjectCreation(Worker.World, customCreator); }
public static void AddClientSystems(World world) { AddLifecycleSystems(world); TransformSynchronizationHelper.AddClientSystems(world); PlayerLifecycleHelper.AddClientSystems(world); GameObjectCreationHelper.EnableStandardGameObjectCreation(world); world.GetOrCreateSystem <ProcessColorChangeSystem>(); world.GetOrCreateSystem <LocalPlayerInputSync>(); world.GetOrCreateSystem <MoveLocalPlayerSystem>(); world.GetOrCreateSystem <InitCameraSystem>(); world.GetOrCreateSystem <FollowCameraSystem>(); world.GetOrCreateSystem <UpdateUISystem>(); world.GetOrCreateSystem <PlayerCommandsSystem>(); world.GetOrCreateSystem <MetricSendSystem>(); }
protected override void HandleWorkerConnectionEstablished() { Worker.World.GetOrCreateSystem <MetricSendSystem>(); PlayerLifecycleHelper.AddClientSystems(Worker.World); var gameObjectCreator = new GameObjectCreatorFromTransform(WorkerType, transform.position); GameObjectCreationHelper.EnableStandardGameObjectCreation(Worker.World, gameObjectCreator, entityRepresentationMapping); TransformSynchronizationHelper.AddClientSystems(Worker.World); // if no level make one.... if (level == null) { return; } levelInstance = Instantiate(level, transform.position, transform.rotation); }
public static void AddClientSystems(World world, UnityEngine.GameObject gameObject, bool autoRequestPlayerCreation = true) { TransformSynchronizationHelper.AddClientSystems(world); PlayerLifecycleHelper.AddClientSystems(world, autoRequestPlayerCreation); GameObjectCreationHelper.EnableStandardGameObjectCreation(world, gameObject); world.GetOrCreateSystem <ProcessColorChangeSystem>(); world.GetOrCreateSystem <AdvancedPlayerInputSync>(); world.GetOrCreateSystem <MoveAdvancedUnitSystem>(); world.GetOrCreateSystem <InitCameraSystem>(); world.GetOrCreateSystem <FollowCameraSystem>(); world.GetOrCreateSystem <InitUISystem>(); world.GetOrCreateSystem <UpdateUISystem>(); world.GetOrCreateSystem <PlayerCommandsSystem>(); world.GetOrCreateSystem <MetricSendSystem>(); world.GetOrCreateSystem <BulletMovementSystem>(); world.GetOrCreateSystem <FieldQueryClientSystem>(); }
protected override void HandleWorkerConnectionEstablished() { Worker.World.GetOrCreateSystem <TankMovementSystem>(); PlayerLifecycleHelper.AddClientSystems(Worker.World); var fallbackCreator = new GameObjectCreatorFromMetadata(Worker.WorkerType, Worker.Origin, Worker.LogDispatcher); var customCreator = new CustomGameObjectCreator(fallbackCreator, Worker.World, Worker.WorkerType, Worker.Origin, Worker.LogDispatcher); GameObjectCreationHelper.EnableStandardGameObjectCreation(Worker.World, customCreator); TransformSynchronizationHelper.AddClientSystems(Worker.World); if (level == null) { return; } levelInstance = Instantiate(level, transform.position, transform.rotation); }
protected override void HandleWorkerConnectionEstablished() { PlayerLifecycleHelper.AddClientSystems(Worker.World); TransformSynchronizationHelper.AddClientSystems(Worker.World); // Set the Worker gameObject to the ClientWorker so it can access PlayerCreater reader/writers var fallback = new GameObjectCreatorFromMetadata(Worker.WorkerType, Worker.Origin, Worker.LogDispatcher); GameObjectCreationHelper.EnableStandardGameObjectCreation( Worker.World, new AdvancedEntityPipeline(Worker, AuthPlayer, NonAuthPlayer, fallback), gameObject); JoinButton.GetComponent <Button>().interactable = true; JoinButton.SetActive(false); LeaveButton.SetActive(true); }
public static void AddClientSystems(World world, bool autoRequestPlayerCreation = true) { TransformSynchronizationHelper.AddClientSystems(world); PlayerLifecycleHelper.AddClientSystems(world, autoRequestPlayerCreation); world.GetOrCreateSystem <LocalLockOnSystem>(); world.GetOrCreateSystem <AimAnimationLocalSystem>(); world.GetOrCreateSystem <AdvancedPlayerInputSync>(); world.GetOrCreateSystem <MoveAdvancedUnitSystem>(); world.GetOrCreateSystem <InitCameraSystem>(); world.GetOrCreateSystem <FollowCameraSystem>(); world.GetOrCreateSystem <PlayerCommandsSystem>(); world.GetOrCreateSystem <MetricSendSystem>(); world.GetOrCreateSystem <BulletMovementSystem>(); world.GetOrCreateSystem <FieldQueryClientSystem>(); world.GetOrCreateSystem <SpawnPointQuerySystem>(); world.GetOrCreateSystem <UnitUIInfoSystem>(); world.GetOrCreateSystem <MiniMapUISystem>(); world.GetOrCreateSystem <LocalTimerUpdateSystem>(); world.GetOrCreateSystem <SymbolicObjectSystem>(); }
public static void AddClientSystems(World world) { AddLifecycleSystems(world); TransformSynchronizationHelper.AddClientSystems(world); PlayerLifecycleHelper.AddClientSystems(world); GameObjectRepresentationHelper.AddSystems(world); GameObjectCreationHelper.EnableStandardGameObjectCreation(world); /* * world.GetOrCreateManager<ProcessColorChangeSystem>(); * world.GetOrCreateManager<LocalPlayerInputSync>(); * world.GetOrCreateManager<MoveLocalPlayerSystem>(); * world.GetOrCreateManager<InitCameraSystem>(); * world.GetOrCreateManager<FollowCameraSystem>(); * world.GetOrCreateManager<InitUISystem>(); * world.GetOrCreateManager<UpdateUISystem>(); */ world.GetOrCreateManager <PlayerCommandsSystem>(); world.GetOrCreateManager <ProcessPlayerResponseSystem>();//process preauth responses from server world.GetOrCreateManager <MetricSendSystem>(); }