本文整理汇总了C#中cocos2d.CCScene类的典型用法代码示例。如果您正苦于以下问题:C# CCScene类的具体用法?C# CCScene怎么用?C# CCScene使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CCScene类属于cocos2d命名空间,在下文中一共展示了CCScene类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
}
示例2: transitionWithDuration
public static CCTransitionFlipY transitionWithDuration(float t, CCScene s, tOrientation o)
{
CCTransitionFlipY pScene = new CCTransitionFlipY();
pScene.initWithDuration(t, s, o);
return pScene;
}
示例3: transitionWithDuration
public static CCTransitionZoomFlipAngular transitionWithDuration(float t, CCScene s, tOrientation o)
{
CCTransitionZoomFlipAngular pScene = new CCTransitionZoomFlipAngular();
pScene.initWithDuration(t, s, o);
return pScene;
}
示例4: Scene
public static CCScene Scene(int score)
{
var scene = new CCScene ();
var layer = new HighScoreLayer (score);
scene.AddChild(layer);
return scene;
}
示例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;
}
示例6: transitionWithDuration
public static new CCTransitionRadialCCW transitionWithDuration(float t, CCScene scene)
{
CCTransitionRadialCCW pScene = new CCTransitionRadialCCW();
pScene.initWithDuration(t, scene);
return pScene;
}
示例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;
}
示例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;
}
示例9: MainMenuCallback
public virtual void MainMenuCallback(object pSender)
{
CCScene pScene = new CCScene();
CCLayer pLayer = new TestController();
pScene.AddChild(pLayer);
CCDirector.SharedDirector.ReplaceScene(pScene);
}
示例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;
}
示例11: runTableViewTest
public static void runTableViewTest()
{
var pScene = new CCScene();
var pLayer = new TableViewTestLayer();
pLayer.Init();
pScene.AddChild(pLayer);
CCDirector.SharedDirector.ReplaceScene(pScene);
}
示例12: scene
public static CCScene scene()
{
CCScene pScene = new CCScene();
//Bug1159Layer layer = Bug1159Layer.node();
//pScene.addChild(layer);
return pScene;
}
示例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 }));
}
示例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;
}
示例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;
}