Пример #1
0
        /// <summary>
        /// Loads textures and parses level for turrets.
        /// </summary>
        /// <param name="Content">Content Manager</param>
        /// <param name="level">Level to get turrets from.</param>
        public TurretManager(ContentManager content,
                             TextureManager textureManager,
                             ProjectileManager projectileManager,
                             ClientShipManager clientShipManager)
        {
            _content           = content;
            _textureManager    = textureManager;
            _projectileManager = projectileManager;
            _clientShipManager = clientShipManager;

            random = new Random(3453);

            // Create Turrets //
            _turretList = new List <Turret>();
            //for (int y = 0; y < level.ySize; y++)
            //    for (int x = 0; x < level.xSize; x++)
            //    {
            //        /*
            //        if (level.PlanetMap[x, y].isTurret)
            //        {
            //            Vector2 temp = new Vector2((turretBase.Width * x) - (turretHead.Width / 2), // Get position for Turret Head
            //                (turretBase.Height * y));

            //            AddTurret(temp); // Adds a turret
            //        }*/
            //    }
        }
Пример #2
0
 public WarpHoleManager(MessageService_ToServer messageManager,
                        ParticleManager particleManager,
                        PhysicsManager physicsManager,
                        ClientShipManager clientShipManager,
                        Texture2D warpholeTexture)
 {
     _messageManager    = messageManager;
     _particleManager   = particleManager;
     _physicsManager    = physicsManager;
     _clientShipManager = clientShipManager;
     WarpholeTexture    = warpholeTexture;
     Warpholes          = new List <WarpHole>();
 }
Пример #3
0
        double _shortClickTime = 300;//ms, Minimum amount of time before button is considered "held"

        public SelectionManager(
            TextDrawingService textDrawingService,
            SpriteBatch spriteBatch,
            ClientShipManager clientShipManager,
            MessageService_ToServer messageManager,
            PhysicsManager physicsManager,
            PlayerShipManager playerShipManager,
            TargetingService targetingService,
            UIConversionService uiConversionService)
        {
            _textDrawingService  = textDrawingService;
            _spriteBatch         = spriteBatch;
            _clientShipManager   = clientShipManager;
            _messageManager      = messageManager;
            _physicsManager      = physicsManager;
            _playerShipManager   = playerShipManager;
            _targetingManager    = targetingService;
            _uiConversionService = uiConversionService;
        }