コード例 #1
0
 public static void Setup(IAssetLibrary assetLibrary, GameSpecification specification, GraphicsDeviceManager graphics, string devContentPath)
 {
     SoundEffectPlayer = new SoundEffectPlayer(specification.settings);
     Assets            = assetLibrary;
     FileSystem        = new MachinaFileSystem(specification.gameTitle, devContentPath);
     Graphics          = graphics;
 }
コード例 #2
0
 public MachinaRuntime(MachinaGame game, GameSpecification specification, IPlatformContext platformContext, Painter painter)
 {
     this.specification   = specification;
     this.game            = game;
     this.platformContext = platformContext;
     this.Painter         = painter;
 }
コード例 #3
0
        public void Setup(MachinaRuntime runtime, GameSpecification specification)
        {
            if (!this.hasBeenSetup)
            {
                BuildSceneLayers(runtime);
                CurrentGameCanvas.BuildCanvas(runtime.Painter);

                runtime.platformContext.OnCartridgeSetup(this, runtime.WindowInterface);
                runtime.WindowInterface.Resized += (size) => CurrentGameCanvas.SetWindowSize(size);

                OnGameLoad(specification, runtime);

                this.hasBeenSetup = true;
            }
        }
コード例 #4
0
ファイル: MachinaGame.cs プロジェクト: notexplosive/machina
        public MachinaGame(GameSpecification specification, GameCartridge gameCartridge, IPlatformContext platformContext, string devContentPath = "")
        {
            this.specification    = specification;
            this.gameCartridge    = gameCartridge;
            this.platformContext  = platformContext;
            Content.RootDirectory = "Content";

            var graphics = new GraphicsDeviceManager(this)
            {
                HardwareModeSwitch = false
            };

            MachinaClient.Setup(new AssetLibrary(this), this.specification, graphics, devContentPath);

            this.platformContext.OnGameConstructed(this);
        }
コード例 #5
0
 /// <summary>
 /// This is executed right after the loading screen finishes. This is your "Main" function.
 /// </summary>
 /// <param name="specification"></param>
 /// <param name="runtime"></param>
 public abstract void OnGameLoad(GameSpecification specification, MachinaRuntime runtime);