当前位置: 首页>>代码示例>>C#>>正文


C# CCScene类代码示例

本文整理汇总了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;
        }
开发者ID:homocury,项目名称:cocos2d-xna,代码行数:12,代码来源:CCTransitionPageTurn.cs

示例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);
        }
开发者ID:trustme,项目名称:cocos2d-mono,代码行数:29,代码来源:Layer3.cs

示例3: Scene

 public static CCScene Scene(int score)
 {
     var scene = new CCScene ();
     var layer = new HighScoreLayer (score);
     scene.Add(layer);
     return scene;
 }
开发者ID:DennisWelu,项目名称:monotouch-bindings,代码行数:7,代码来源:HighScoreLayer.cs

示例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;
        }
开发者ID:eickegao,项目名称:cocos2d-xna,代码行数:12,代码来源:CCTransitionSceneOriented.cs

示例5: Create

        public static new CCTransitionFadeDown Create(float t, CCScene scene)
        {
            var pScene = new CCTransitionFadeDown();
            if (pScene.InitWithDuration(t, scene))
            {
                return pScene;
            }

            return null;
        }
开发者ID:homocury,项目名称:cocos2d-xna,代码行数:10,代码来源:CCTransitionFadeDown.cs

示例6: Create

        public static new CCTransitionTurnOffTiles Create(float t, CCScene scene)
        {
            var pScene = new CCTransitionTurnOffTiles();
            if (pScene.InitWithDuration(t, scene))
            {
                return pScene;
            }

            return null;
        }
开发者ID:eickegao,项目名称:cocos2d-xna,代码行数:10,代码来源:CCTransitionTurnOffTiles.cs

示例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;
        }
开发者ID:homocury,项目名称:cocos2d-xna,代码行数:17,代码来源:CCTransitionPageTurn.cs

示例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);
        }
开发者ID:trustme,项目名称:cocos2d-mono,代码行数:12,代码来源:AppDelegate.cs

示例9: CCTransitionMoveInB

 public CCTransitionMoveInB(float t, CCScene scene)
     : base(t, scene)
 {
 }
开发者ID:HarkDev,项目名称:cocos2d-xna,代码行数:4,代码来源:CCTransitionMoveInB.cs

示例10: CCTransitionZoomFlipAngular

 public CCTransitionZoomFlipAngular (float t, CCScene s, CCTransitionOrientation o) : base (t,s,o)
 { }
开发者ID:CartBlanche,项目名称:cocos2d-xna,代码行数:2,代码来源:CCTransitionZoomFlipAngular.cs

示例11: CCTransitionFadeUp

 public CCTransitionFadeUp(float t, CCScene scene) : base(t, scene)
 {
     InitWithDuration(t, scene);
 }
开发者ID:Ratel13,项目名称:cocos2d-xna,代码行数:4,代码来源:CCTransitionFadeUp.cs

示例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;
 }
开发者ID:eickegao,项目名称:cocos2d-xna,代码行数:9,代码来源:CCTransitionSceneOriented.cs

示例13: Scene

 public static CCScene Scene(this CCLayer layer)
 {
     var scene = new CCScene ();
     scene.Add (layer);
     return scene;
 }
开发者ID:WinterGroveProductions,项目名称:monotouch-bindings,代码行数:6,代码来源:CCLayerExtensions.cs

示例14: OnPushScene

 void OnPushScene(NSObject CCSenderCallback)
 {
     CCScene scene = new CCScene();
     scene.AddChild (new Layer2 (), 0);
     CCDirector.SharedDirector ().PushScene (scene);
 }
开发者ID:trustme,项目名称:cocos2d-mono,代码行数:6,代码来源:Layer1.cs

示例15: CCTransitionFadeUp

 public CCTransitionFadeUp(float t, CCScene scene) : base(t, scene)
 {
 }
开发者ID:h7ing,项目名称:CocosSharp,代码行数:3,代码来源:CCTransitionFadeUp.cs


注:本文中的CCScene类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。