コード例 #1
0
ファイル: Server.cs プロジェクト: V4lonforth/ProjectGame
        static void Main(string[] args)
        {
            Room   room   = new Room(listeningPort, sendingPort, ShipInfo.GetShipsInfo());
            Thread thread = new Thread(room.Work);

            thread.Start();
        }
コード例 #2
0
        public ShipsController(ContentManager Content, BaseLootController lController, BaseProjectilesController projController, ParticleSystem parSystem,
                               Camera cam, Action <Action <Vector2>, Action <Vector2> > actions)
        {
            joystickActions = actions;
            camera          = cam;
            Texture2D[] shipSprites = new Texture2D[shipsTypesCount];
            for (int i = 0; i < shipsTypesCount; i++)
            {
                shipSprites[i] = Content.Load <Texture2D>(shipSpritesPath + i.ToString());
            }
            shipsInfo = ShipInfo.GetShipsInfo(shipSprites);

            ships                 = new List <ShipController>();
            shipsPlayers          = new List <ShipController>();
            lootController        = lController;
            projectilesController = projController;
            particleSystem        = parSystem;
        }