コード例 #1
0
        public HappinessDesktopGame()
        {
#if DEBUG
            System.Threading.Thread.Sleep(1000);
#endif
            graphics = new GraphicsDeviceManager(this);

            _google   = new GoogleAuth_Desktop();
            _facebook = new FacebookAuth_Desktop();
            _purchase = new PurchaseSystem_Desktop();
            _platform = new Platform_Desktop()
            {
                TheGame = this
            };
            _input       = new InputController_XNA();
            _fileManager = new FileManager_Desktop();
            _mediaPlayer = new MediaPlayer_XNA();
            _theGame     = new Happiness.Happiness();

            //graphics.PreferredBackBufferWidth = 1280;
            //graphics.PreferredBackBufferHeight = 720;


            graphics.PreferredBackBufferWidth  = 2560;
            graphics.PreferredBackBufferHeight = 1440;

            Content.RootDirectory = "Content";
            IsMouseVisible        = true;
        }
コード例 #2
0
        public HappinessAndroidGame()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            Console.WriteLine("HappinessAndroidGame");

            _virtKeyboard = new VirtualKeyboard_Android();
            _google       = new GoogleAuth_Android();
            _facebook     = new FacebookAuth_Android();
            _purchase     = new PurchaseSystem_Android();
            _platform     = new Platform_Android()
            {
                TheGame = this
            };
            _input       = new InputController_XNA();
            _fileManager = new FileManager_Android();
            _mediaPlayer = new MediaPlayer_XNA();
            _theGame     = new Happiness.Happiness();

            graphics.IsFullScreen = true;
            //graphics.PreferredBackBufferWidth = 1280;
            //graphics.PreferredBackBufferHeight = 720;
            graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight;
        }
コード例 #3
0
        public override void Update(Happiness.Happiness theGame, double time)
        {
            UpdateMouse();
            UpdateTouch();
            UpdateKeyboard();

            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            {
                Invoke_OnKeyDown(this, new Happiness.KeyArgs(Happiness.Keys.Escape, false));
                Invoke_OnKeyUp(this, new Happiness.KeyArgs(Happiness.Keys.Escape, false));
            }
        }