Exemplo n.º 1
0
 public Client(MonoGame gm, HandleMessage msgHandler)
 {
     game           = gm;
     config         = new NetPeerConfiguration("Client");
     client         = new NetClient(config);
     messageHandler = msgHandler;
 }
Exemplo n.º 2
0
        public static void Init(MonoGame gme)
        {
            game = gme;

            fontDirectory = Directory.GetCurrentDirectory() + @"\..\..\..\..\Content\Fonts\";

            fontPath = "defaultFont.spritefont";
        }
Exemplo n.º 3
0
        public GameObject(MonoGame gme, int x, int y, int width, int height, Color?tnt = null, float drawLayer = 0f)
        {
            game = gme;

            tint = tnt == null ? Color.Transparent : tnt.Value;

            rect = new Rect(this, x, y, width, height, tnt == Color.Transparent ? Color.Black : tint);

            rect.drawLayer = drawLayer;
        }
Exemplo n.º 4
0
        public static void Init(int resWidth, int resHeight, int windowWidth, int windowHeight, MonoGame gme)
        {
            ResolutionWidth  = resWidth;
            ResolutionHeight = resHeight;

            game = gme;

            WindowWidth  = windowWidth;
            WindowHeight = windowHeight;

            game.ResizeWindow(WindowWidth, WindowHeight);

            originalWindowSize = new Vector2(WindowWidth, WindowHeight);

            PreserveResolution();
        }
Exemplo n.º 5
0
 public Server(MonoGame gm, HandleMessage msgHandler)
 {
     game           = gm;
     messageHandler = msgHandler;
 }