本文整理汇总了C#中Page.Start方法的典型用法代码示例。如果您正苦于以下问题:C# Page.Start方法的具体用法?C# Page.Start怎么用?C# Page.Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Page
的用法示例。
在下文中一共展示了Page.Start方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GoToPage
public void GoToPage(PageType pageType)
{
RXDebug.Log("Here i am changing the page");
if(_currentPageType == pageType) return;
Page pageToCreate = null;
if(pageType == PageType.MenuPage)
{
pageToCreate = new MenuPage();
}
if(pageType == PageType.InGamePage)
{
pageToCreate = new InGamePage();
}
if(pageToCreate != null)
{
_currentPageType = pageType;
if(_currentPage != null)
{
_stage.RemoveChild(_currentPage);
}
_currentPage = pageToCreate;
_stage.AddChild(_currentPage);
_currentPage.Start();
}
}
示例2: GoToPage
public void GoToPage(PageType pageType)
{
Page pageToCreate = null;
if(pageType == PageType.MainMenuPage)
{
pageToCreate = new MainMenuPage();
}
if(pageType == PageType.InGamePage)
{
pageToCreate = new InGamePage();
}
if(pageToCreate != null)
{
_currentPageType = pageType;
if(_currentPage != null)
{
_stage.RemoveChild(_currentPage);
}
_currentPage = pageToCreate;
_stage.AddChild(_currentPage);
_currentPage.Start();
}
}
示例3: GoToPage
public void GoToPage(PageType pageType)
{
if (_currentPageType == pageType)
return;
Page pageToCreate = null;
if (pageType == PageType.MenuPage)
{
pageToCreate = new MainMenuPage();
}
if (pageType == PageType.GamePage)
{
pageToCreate = new GamePage ();
}
if (pageType == PageType.FinalPage)
{
pageToCreate = new FinalPage ();
}
if (pageToCreate != null) {
_currentPageType = pageType;
if (_currentPage != null) {
_stage.RemoveAllChildren();
}
_currentPage = pageToCreate;
_stage.AddChild (_currentPage);
_currentPage.Start ();
}
}
示例4: ShowPage
public void ShowPage(Page page)
{
if(currentPage != null)
{
currentPage.Destroy();
currentPage.RemoveFromContainer();
currentPage = null;
}
currentPage = page;
AddChild(currentPage);
currentPage.Start();
}
示例5: GoToPage
public void GoToPage(PageType pageType,bool force)
{
if(_currentPageType == pageType) if (!force) return; //we're already on the same page, so don't bother doing anything
Page pageToCreate = null;
Debug.Log(pageType.ToString());
Type type = Type.GetType(pageType.ToString());
object o=Activator.CreateInstance(type);
pageToCreate = (Page)o;
//pageToCreate = (TPage)(System.Reflection.Assembly.GetExecutingAssembly().CreateInstance(pageType.ToString()));
if(pageToCreate != null) //destroy the old page and create a new one
{
_currentPageType = pageType;
if(_currentPage != null)
{
_stage.RemoveChild(_currentPage);
}
_currentPage = pageToCreate;
_stage.AddChild(_currentPage);
_currentPage.Start();
}
}
示例6: GoToPage
public void GoToPage(PageType pageType)
{
Page pageToCreate = null;
_currentPageType = pageType;
if(_currentPage != null)
{
_stage.RemoveChild(_currentPage);
}
if (pageType == PageType.GamePage)
pageToCreate = new GamePage();
_currentPage = pageToCreate;
_stage.AddChild(_currentPage);
_currentPage.Start();
}