本文整理汇总了C#中IScene.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# IScene.Initialize方法的具体用法?C# IScene.Initialize怎么用?C# IScene.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IScene
的用法示例。
在下文中一共展示了IScene.Initialize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
App.InitializeGamePageGraphics(gameContext);
// Initialize the level scene
scene = new LevelScene();
scene.Initialize(gameContext);
base.OnNavigatedTo(e);
timer.Start();
}
示例2: Initialize
protected override void Initialize()
{
_scenes = new List<IScene>
{
new MainMenu(),
new Gameboard()
};
_renderers = new Dictionary<IScene, ICanRender>
{
{_scenes[0], new MenuRenderer()},
{_scenes[1], new GameboardRenderer()}
};
_activeScene = _scenes.First();
_activeScene.Initialize();
base.Initialize();
}
示例3: InitializeScene
private void InitializeScene()
{
scene = new LevelSelectScene();
scene.Initialize(gameContext);
}
示例4: CreateScene
//--------------------------------------//
// 関数名 CreateScene //
// Function name CreateScene
// 機能 予約されたシーンを作成 //
// Create a scene that has been reserved function
// 引数 なし //
// No argument
// 戻り値 なし //
// No return value
//--------------------------------------//
public void CreateScene()
{
// Delete the current scene
currentScene = null;
// Create a scene that is reserved
switch (nextScene)
{
// Sample scene
case SCENE_TYPE.SAMPLE_SCENE1:
currentScene = new SampleScene1();
break;
// Sample Scene 2
case SCENE_TYPE.MAIN_MENU_SCENE:
currentScene = new MainMenu();
break;
case SCENE_TYPE.TITLE_SCENE:
currentScene = new TitleScene();
break;
}
// I to the scene without reservation the following
nextScene = SCENE_TYPE.NONE;
// I call the initialization processing of the scene that contains new
currentScene.Initialize();
// I call the processing load of the scene that contains new
currentScene.LoadContent(this.content);
}