public static void AddStrategyLogicSystems(World world, EntityRepresentationMapping entityRepresentationMapping) { TransformSynchronizationHelper.AddServerSystems(world); PlayerLifecycleHelper.AddServerSystems(world); GameObjectCreationHelper.EnableStandardGameObjectCreation(world, entityRepresentationMapping); world.GetOrCreateSystem <ProcessLaunchCommandSystem>(); world.GetOrCreateSystem <MetricSendSystem>(); //world.GetOrCreateSystem<ArmyCloudUpdateSystem>(); }
public static void EnableStandardGameObjectCreation(World world, EntityRepresentationMapping entityRepresentationMapping, GameObject workerGameObject = null) { var workerSystem = world.GetExistingSystem <WorkerSystem>(); if (workerSystem == null) { throw new InvalidOperationException(WorkerNotCreatedErrorMessage); } var creator = new GameObjectCreatorFromMetadata(workerSystem.WorkerType, workerSystem.Origin); EnableStandardGameObjectCreation(world, creator, entityRepresentationMapping, workerGameObject); }
public static void AddGameLogicSystems(World world, EntityRepresentationMapping entityRepresentationMapping) { AddLifecycleSystems(world); TransformSynchronizationHelper.AddServerSystems(world); PlayerLifecycleHelper.AddServerSystems(world); GameObjectCreationHelper.EnableStandardGameObjectCreation(world, entityRepresentationMapping); world.GetOrCreateSystem <TriggerColorChangeSystem>(); world.GetOrCreateSystem <ProcessLaunchCommandSystem>(); world.GetOrCreateSystem <ProcessRechargeSystem>(); world.GetOrCreateSystem <MetricSendSystem>(); world.GetOrCreateSystem <ProcessScoresSystem>(); world.GetOrCreateSystem <CollisionProcessSystem>(); world.GetOrCreateSystem <CubeMovementSystem>(); }
public static void AddClientSystems(World world, EntityRepresentationMapping entityRepresentationMapping) { AddLifecycleSystems(world); TransformSynchronizationHelper.AddClientSystems(world); PlayerLifecycleHelper.AddClientSystems(world); GameObjectCreationHelper.EnableStandardGameObjectCreation(world, entityRepresentationMapping); world.GetOrCreateSystem <ProcessColorChangeSystem>(); world.GetOrCreateSystem <LocalPlayerInputSync>(); world.GetOrCreateSystem <MoveLocalPlayerSystem>(); world.GetOrCreateSystem <InitCameraSystem>(); world.GetOrCreateSystem <FollowCameraSystem>(); world.GetOrCreateSystem <UpdateUISystem>(); world.GetOrCreateSystem <PlayerCommandsSystem>(); world.GetOrCreateSystem <MetricSendSystem>(); }
public static void EnableStandardGameObjectCreation(World world, IEntityGameObjectCreator creator, EntityRepresentationMapping entityRepresentationMapping, GameObject workerGameObject = null) { var workerSystem = world.GetExistingSystem <WorkerSystem>(); if (workerSystem == null) { throw new InvalidOperationException(WorkerNotCreatedErrorMessage); } if (world.GetExistingSystem <GameObjectInitializationSystem>() != null) { workerSystem.LogDispatcher.HandleLog(LogType.Error, new LogEvent( "You should only call EnableStandardGameobjectCreation() once on worker setup") .WithField(LoggingUtils.LoggerName, nameof(GameObjectCreationHelper))); return; } world.AddSystem(new GameObjectInitializationSystem(creator, entityRepresentationMapping, workerGameObject)); }