本文整理汇总了C#中cocos2d.CCScene类的典型用法代码示例。如果您正苦于以下问题:C# CCScene类的具体用法?C# CCScene怎么用?C# CCScene使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CCScene类属于cocos2d命名空间,在下文中一共展示了CCScene类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: onAnimationsTestClicked
public void onAnimationsTestClicked(object pSender, CCControlEvent pCCControlEvent)
{
// Load node graph (TestAnimations is a sub class of CCLayer) and retrieve the ccb action manager
CCBAnimationManager actionManager = null;
/* Create an autorelease CCNodeLoaderLibrary. */
CCNodeLoaderLibrary ccNodeLoaderLibrary = CCNodeLoaderLibrary.NewDefaultCCNodeLoaderLibrary();
ccNodeLoaderLibrary.RegisterCCNodeLoader("TestHeaderLayer", new Loader<TestHeaderLayer>());
ccNodeLoaderLibrary.RegisterCCNodeLoader("TestAnimationsLayer", new Loader<AnimationsTestLayer>());
/* Create an autorelease CCBReader. */
var ccbReader = new CCBReader(ccNodeLoaderLibrary);
/* Read a ccbi file. */
// Load the scene from the ccbi-file, setting this class as
// the owner will cause lblTestTitle to be set by the CCBReader.
// lblTestTitle is in the TestHeader.ccbi, which is referenced
// from each of the test scenes.
CCNode animationsTest = ccbReader.ReadNodeGraphFromFile("ccb/ccb/TestAnimations.ccbi", this, ref actionManager);
((AnimationsTestLayer) animationsTest).setAnimationManager(actionManager);
mTestTitleLabelTTF.Label = ("TestAnimations.ccbi");
CCScene scene = new CCScene();
scene.AddChild(animationsTest);
/* Push the new scene with a fancy transition. */
CCColor3B transitionColor;
transitionColor.R = 0;
transitionColor.G = 0;
transitionColor.B = 0;
CCDirector.SharedDirector.PushScene(new CCTransitionFade(0.5f, scene, transitionColor));
}
开发者ID:HarkDev,项目名称:cocos2d-xna,代码行数:35,代码来源:HelloCocosBuilder.cs
示例2: transitionWithDuration
public static CCTransitionFlipY transitionWithDuration(float t, CCScene s, tOrientation o)
{
CCTransitionFlipY pScene = new CCTransitionFlipY();
pScene.initWithDuration(t, s, o);
return pScene;
}
开发者ID:ChowZenki,项目名称:cocos2d-x-for-xna,代码行数:7,代码来源:CCTransitionFlipY.cs
示例3: transitionWithDuration
public static CCTransitionZoomFlipAngular transitionWithDuration(float t, CCScene s, tOrientation o)
{
CCTransitionZoomFlipAngular pScene = new CCTransitionZoomFlipAngular();
pScene.initWithDuration(t, s, o);
return pScene;
}
开发者ID:liwq-net,项目名称:cocos2d-for-xna-windows,代码行数:7,代码来源:CCTransitionZoomFlipAngular.cs
示例4: Scene
public static CCScene Scene(int score)
{
var scene = new CCScene ();
var layer = new HighScoreLayer (score);
scene.AddChild(layer);
return scene;
}
开发者ID:eickegao,项目名称:cocos2d-xna,代码行数:7,代码来源:HighScoreLayer.cs
示例5: transitionWithDuration
/// <summary>
/// Creates a base transition with duration and incoming scene.
/// If back is true then the effect is reversed to appear as if the incoming
/// scene is being turned from left over the outgoing scene.
/// </summary>
public static CCTransitionPageTurn transitionWithDuration(float t, CCScene scene, bool backwards)
{
CCTransitionPageTurn pTransition = new CCTransitionPageTurn();
pTransition.initWithDuration(t, scene, backwards);
return pTransition;
}
开发者ID:Ratel13,项目名称:cocos2d-x-for-xna,代码行数:12,代码来源:CCTransitionPageTurn.cs
示例6: transitionWithDuration
public static new CCTransitionRadialCCW transitionWithDuration(float t, CCScene scene)
{
CCTransitionRadialCCW pScene = new CCTransitionRadialCCW();
pScene.initWithDuration(t, scene);
return pScene;
}
开发者ID:liwq-net,项目名称:liwq718,代码行数:7,代码来源:CCTransitionRadialCCW.cs
示例7: initWithDuration
/// <summary>
/// initializes a transition with duration and incoming scene
/// </summary>
/// <param name="t"></param>
/// <param name="scene"></param>
/// <param name="orientation"></param>
/// <returns></returns>
public virtual bool initWithDuration(float t, CCScene scene, tOrientation orientation)
{
if (base.initWithDuration(t, scene))
{
m_eOrientation = orientation;
}
return true;
}
开发者ID:ChowZenki,项目名称:cocos2d-x-for-xna,代码行数:15,代码来源:CCTransitionSceneOriented.cs
示例8: InitWithDuration
/// <summary>
/// initializes the transition with a duration and with an RGB color
/// </summary>
public virtual bool InitWithDuration(float duration, CCScene scene, CCColor3B color)
{
if (base.InitWithDuration(duration, scene))
{
m_tColor = new CCColor4B {R = color.R, G = color.G, B = color.B, A = 0};
}
return true;
}
开发者ID:homocury,项目名称:cocos2d-xna,代码行数:11,代码来源:CCTransitionFade.cs
示例9: MainMenuCallback
public virtual void MainMenuCallback(object pSender)
{
CCScene pScene = new CCScene();
CCLayer pLayer = new TestController();
pScene.AddChild(pLayer);
CCDirector.SharedDirector.ReplaceScene(pScene);
}
开发者ID:homocury,项目名称:cocos2d-xna,代码行数:8,代码来源:testBasic.cs
示例10: scene
public static CCScene scene()
{
CCScene pScene = new CCScene();
TextureTest layer = new TextureTest(false, PerformanceTextureTest.TEST_COUNT, PerformanceTextureTest.s_nTexCurCase);
pScene.AddChild(layer);
return pScene;
}
开发者ID:homocury,项目名称:cocos2d-xna,代码行数:8,代码来源:TextureTest.cs
示例11: runTableViewTest
public static void runTableViewTest()
{
var pScene = new CCScene();
var pLayer = new TableViewTestLayer();
pLayer.Init();
pScene.AddChild(pLayer);
CCDirector.SharedDirector.ReplaceScene(pScene);
}
开发者ID:HarkDev,项目名称:cocos2d-xna,代码行数:8,代码来源:TableViewTestScene.cs
示例12: scene
public static CCScene scene()
{
CCScene pScene = new CCScene();
//Bug1159Layer layer = Bug1159Layer.node();
//pScene.addChild(layer);
return pScene;
}
开发者ID:KogleDK,项目名称:cocos2d-xna-1,代码行数:8,代码来源:Bug1159Layer.cs
示例13: switchLayer
public void switchLayer(float dt)
{
//unschedule(Bug624Layer.switchLayer);
CCScene scene = new CCScene();
scene.AddChild(new Bug624Layer2(), 0);
CCDirector.SharedDirector.ReplaceScene(new CCTransitionFade(2.0f, scene, new CCColor3B { R = 255, G = 255, B = 255 }));
}
开发者ID:HarkDev,项目名称:cocos2d-xna,代码行数:8,代码来源:Bug624Layer.cs
示例14: transitionWithDuration
//DECLEAR_TRANSITIONWITHDURATION(CCTransitionShrinkGrow);
public static new CCTransitionShrinkGrow transitionWithDuration(float t, CCScene scene)
{
CCTransitionShrinkGrow pScene = new CCTransitionShrinkGrow();
if (pScene != null && pScene.initWithDuration(t, scene))
{
return pScene;
}
pScene = null;
return null;
}
开发者ID:ChowZenki,项目名称:cocos2d-x-for-xna,代码行数:11,代码来源:CCTransitionShrinkGrow.cs
示例15: transitionWithDuration
//DECLEAR_TRANSITIONWITHDURATION(CCTransitionRotoZoom);
public static CCTransitionRotoZoom transitionWithDuration(float t, CCScene scene)
{
CCTransitionRotoZoom pScene = new CCTransitionRotoZoom();
if (pScene != null && pScene.initWithDuration(t, scene))
{
return pScene;
}
pScene = null;
return null;
}
开发者ID:Ratel13,项目名称:cocos2d-x-for-xna,代码行数:11,代码来源:CCTransitionRotoZoom.cs
示例16: transitionWithDuration
//DECLEAR_TRANSITIONWITHDURATION(CCTransitionSplitRows)
public new static CCTransitionSplitRows transitionWithDuration(float t, CCScene scene)
{
CCTransitionSplitRows pScene = new CCTransitionSplitRows();
if (pScene.initWithDuration(t, scene))
{
return pScene;
}
return null;
}
开发者ID:Ratel13,项目名称:cocos2d-x-for-xna,代码行数:11,代码来源:CCTransitionSplitRows.cs
示例17: transitionWithDuration
//DECLEAR_TRANSITIONWITHDURATION(CCTransitionTurnOffTiles);
public static new CCTransitionTurnOffTiles transitionWithDuration(float t, CCScene scene)
{
CCTransitionTurnOffTiles pScene = new CCTransitionTurnOffTiles();
if (pScene.initWithDuration(t, scene))
{
return pScene;
}
return null;
}
开发者ID:Openxlive,项目名称:cocos2d-x-for-xna,代码行数:11,代码来源:CCTransitionTurnOffTiles.cs
示例18: runTouchesTest
public static void runTouchesTest()
{
s_nTouchCurCase = 0;
CCScene pScene = new CCScene();
CCLayer pLayer = new TouchesPerformTest1(true, TEST_COUNT, s_nTouchCurCase);
pScene.AddChild(pLayer);
CCDirector.SharedDirector.ReplaceScene(pScene);
}
开发者ID:homocury,项目名称:cocos2d-xna,代码行数:10,代码来源:PerformanceTouchesTest.cs
示例19: transitionWithDuration
//public DECLEAR_TRANSITIONWITHDURATION(CCTransitionFadeDown)
CCTransitionFadeDown transitionWithDuration(float t, CCScene scene)
{
CCTransitionFadeDown pScene = new CCTransitionFadeDown();
if (pScene != null && pScene.initWithDuration(t, scene))
{
return pScene;
}
pScene = null;
return null;
}
开发者ID:ChowZenki,项目名称:cocos2d-x-for-xna,代码行数:11,代码来源:CCTransitionFadeDown.cs
示例20: transitionWithDuration
//public DECLEAR_TRANSITIONWITHDURATION(CCTransitionSplitCols);
public static new CCTransitionSplitCols transitionWithDuration(float t, CCScene scene)
{
CCTransitionSplitCols pScene = new CCTransitionSplitCols();
if (pScene != null && pScene.initWithDuration(t, scene))
{
return pScene;
}
pScene = null;
return null;
}
开发者ID:ChowZenki,项目名称:cocos2d-x-for-xna,代码行数:11,代码来源:CCTransitionSplitCols.cs
注:本文中的cocos2d.CCScene类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论