本文整理汇总了C#中CCScene类的典型用法代码示例。如果您正苦于以下问题:C# CCScene类的具体用法?C# CCScene怎么用?C# CCScene使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CCScene类属于命名空间,在下文中一共展示了CCScene类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
/// <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 Create(float t, CCScene scene, bool backwards)
{
var pTransition = new CCTransitionPageTurn();
pTransition.InitWithDuration(t, scene, backwards);
return pTransition;
}
示例2: Layer3
public Layer3()
: base(new ccColor4B (0,0,255,255))
{
CGSize s = CCDirector.SharedDirector ().WinSize ();
CCMenuItemFont item0 = new CCMenuItemFont("Touch to pushScene (self)", delegate {
CCScene newScene = new CCScene();
newScene.AddChild (new Layer3 ());
CCDirector.SharedDirector ().PushScene (new CCTransitionFade (0.5f, newScene, new ccColor3B (0, 255, 255)));
});
CCMenuItemFont item1 = new CCMenuItemFont("Touch to popScene", delegate {
CCDirector.SharedDirector ().PopScene ();
});
CCMenuItemFont item2 = new CCMenuItemFont("Touch to popToRootScene", delegate {
CCDirector.SharedDirector ().PopToRootScene ();
});
CCMenu menu = new CCMenu(item0, item1, item2);
this.AddChild (menu);
menu.AlignItemsVertically ();
CCSprite sprite = new CCSprite("grossini.png", true);
this.AddChild (sprite);
sprite.Position = new CCPoint(s.Width / 2, 40);
var rotate = new CCRotateBy (2, 360);
var repeat = new CCRepeatForever (rotate);
sprite.RunAction (repeat);
}
示例3: Scene
public static CCScene Scene(int score)
{
var scene = new CCScene ();
var layer = new HighScoreLayer (score);
scene.Add(layer);
return scene;
}
示例4: InitWithDuration
/// <summary>
/// initializes a transition with duration and incoming scene
/// </summary>
public virtual bool InitWithDuration(float t, CCScene scene, tOrientation orientation)
{
if (base.InitWithDuration(t, scene))
{
m_eOrientation = orientation;
}
return true;
}
示例5: Create
public static new CCTransitionFadeDown Create(float t, CCScene scene)
{
var pScene = new CCTransitionFadeDown();
if (pScene.InitWithDuration(t, scene))
{
return pScene;
}
return null;
}
示例6: Create
public static new CCTransitionTurnOffTiles Create(float t, CCScene scene)
{
var pScene = new CCTransitionTurnOffTiles();
if (pScene.InitWithDuration(t, scene))
{
return pScene;
}
return null;
}
示例7: InitWithDuration
/// <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 virtual bool InitWithDuration(float t, CCScene scene, bool backwards)
{
// XXX: needed before [super init]
m_bBack = backwards;
if (base.InitWithDuration(t, scene))
{
// do something
}
return true;
}
示例8: FinishedLaunching
public override void FinishedLaunching(NSObject notification)
{
CCDirector director = CCDirector.SharedDirector ();
director.View = glView;
director.DisplayStats = true;
CCScene scene = new CCScene();
Layer1 l = new Layer1();
scene.AddChild (l);
director.RunWithScene (scene);
}
示例9: CCTransitionMoveInB
public CCTransitionMoveInB(float t, CCScene scene)
: base(t, scene)
{
}
示例10: CCTransitionZoomFlipAngular
public CCTransitionZoomFlipAngular (float t, CCScene s, CCTransitionOrientation o) : base (t,s,o)
{ }
示例11: CCTransitionFadeUp
public CCTransitionFadeUp(float t, CCScene scene) : base(t, scene)
{
InitWithDuration(t, scene);
}
示例12: Create
/// <summary>
/// creates a base transition with duration and incoming scene
/// </summary>
public static CCTransitionSceneOriented Create(float t, CCScene scene, tOrientation orientation)
{
var pScene = new CCTransitionSceneOriented();
pScene.InitWithDuration(t, scene, orientation);
return pScene;
}
示例13: Scene
public static CCScene Scene(this CCLayer layer)
{
var scene = new CCScene ();
scene.Add (layer);
return scene;
}
示例14: OnPushScene
void OnPushScene(NSObject CCSenderCallback)
{
CCScene scene = new CCScene();
scene.AddChild (new Layer2 (), 0);
CCDirector.SharedDirector ().PushScene (scene);
}
示例15: CCTransitionFadeUp
public CCTransitionFadeUp(float t, CCScene scene) : base(t, scene)
{
}