internal override void Apply(Player player, MatchManager matchManager)
 {
     if (player == null)
     {
         matchManager.random.SetSeed(seed);
     }
 }
 internal override void Apply(Player player, MatchManager matchManager)
 {
     if (player == null)
     {
         matchManager.playerManager.RemovePlayer(id);
     }
 }
Beispiel #3
0
        internal GameModeManager(MatchManager matchManager)
        {
            this.matchManager = matchManager;

            matchManager.physicsManager.SetLayerCollision(CollisionLayersConfig.AsteroidLayer, CollisionLayersConfig.SpaceshipLayer, true);

            matchManager.physicsManager.SetLayerCollision(CollisionLayersConfig.WeaponLayer, CollisionLayersConfig.AsteroidLayer, true);
        }
            internal override void Apply(Player player, MatchManager matchManager)
            {
                var entity = matchManager.entityManager.TryGetEntity(shipEntityPointer);

                if (entity == null || entity.Owner != player.id)
                {
                    return;
                }

                var spaceshipController = entity.GetComponent <SpaceshipController>();

                spaceshipController?.SetControls(controls);
            }
 internal PlayerManager(MatchManager matchManager)
 {
     this.matchManager = matchManager;
 }
        internal PhysicsManager(MatchManager matchManager)
        {
            this.matchManager = matchManager;

            collisionMatrix = new BitArray(CollisionLayersConfig.MaxCollisionLayers * CollisionLayersConfig.MaxCollisionLayers, false);
        }
 internal abstract void Apply(Player player, MatchManager matchManager);
 internal override void Apply(Player player, MatchManager matchManager)
 {
     matchManager.gameModeManager.Respawn(player);
 }
 internal EntityManager(MatchManager matchManager)
 {
     this.matchManager = matchManager;
 }