• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CocosSharp.CCSequence类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CocosSharp.CCSequence的典型用法代码示例。如果您正苦于以下问题:C# CCSequence类的具体用法?C# CCSequence怎么用?C# CCSequence使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CCSequence类属于CocosSharp命名空间,在下文中一共展示了CCSequence类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GameLayer

        public GameLayer()
            : base(CCColor4B.Blue, CCColor4B.AliceBlue)
        {
            // Set the layer gradient direction
            this.Vector = new CCPoint (0.5f, 0.5f);

            // Create and add sprites
            // We will later be applying a wave action to these sprites
            // These type of actions can only be applied to CCNodeGrid instances
            // Therefore, wrap our sprites in a CCNodeGrid parent
            monkeySprite1 = new CCNodeGrid ();
            monkeySprite1.AddChild (new CCSprite ("monkey"));
            AddChild (monkeySprite1);

            monkeySprite2 = new CCNodeGrid ();
            monkeySprite2.AddChild (new CCSprite ("monkey"));
            AddChild (monkeySprite2);

            // Define actions
            var moveUp = new CCMoveBy (1.0f, new CCPoint (0.0f, 50.0f));
            var moveDown = moveUp.Reverse ();

            // A CCSequence action runs the list of actions in ... sequence!
            CCSequence moveSeq = new CCSequence (new CCEaseBackInOut (moveUp), new CCEaseBackInOut (moveDown));

            repeatedAction = new CCRepeatForever (moveSeq);

            // A CCSpawn action runs the list of actions concurrently
            dreamAction = new CCSpawn (new CCFadeIn (5.0f), new CCWaves (5.0f, new CCGridSize (10, 20), 4, 4));

            // Schedule for method to be called every 0.1s
            Schedule (UpdateLayerGradient, 0.1f);
        }
开发者ID:patridge,项目名称:CocosSharpLovesXamarinForms,代码行数:33,代码来源:GameLayer.cs


示例2: OnEnter

        public override void OnEnter()
        {
            base.OnEnter();

            var s = Layer.VisibleBoundsWorldspace.Size;

            var layer1 = new CCLayerColor(new CCColor4B(255, 255, 0, 80));
            layer1.Position = (new CCPoint(s.Width / 3, s.Height / 2));
            layer1.IgnoreAnchorPointForPosition = false;
            AddChild(layer1, 1);

            var layer2 = new CCLayerColor(new CCColor4B(0, 0, 255, 255));
            layer2.Position = (new CCPoint((s.Width / 3) * 2, s.Height / 2));
            layer2.IgnoreAnchorPointForPosition = false;
            AddChild(layer2, 1);

            var actionTint = new CCTintBy (2, -255, -127, 0);
            var actionTintBack = actionTint.Reverse();
            var seq1 = new CCSequence(actionTint, actionTintBack);
            layer1.RunAction(seq1);

            var actionFade = new CCFadeOut(2.0f);
            var actionFadeBack = actionFade.Reverse();
            var seq2 = new CCSequence(actionFade, actionFadeBack);
            layer2.RunAction(seq2);
        }
开发者ID:KerwinMa,项目名称:CocosSharp,代码行数:26,代码来源:LayerTest2.cs


示例3: OnEnter

        public override void OnEnter()
        {
            base.OnEnter();

			var effect = new CCSequence(new CCDelayTime (2.0f), new CCShaky3D(5.0f, new CCGridSize(5, 5), 16, false));

            // cleanup
			RemoveChild(bgNode, true);

            // background
			var layer = new CCLayerColor(new CCColor4B(255, 0, 0, 255));
            AddChild(layer, -10);
			var sprite = new CCSprite("Images/grossini");
            sprite.Position = new CCPoint(50, 80);
            layer.AddChild(sprite, 10);

            // foreground
			var layer2Node = new CCNode ();
			var layer2 = new CCLayerColor(new CCColor4B(0, 255, 0, 255));
			var fog = new CCSprite("Images/Fog");

			var bf = new CCBlendFunc {Source = CCOGLES.GL_SRC_ALPHA, Destination = CCOGLES.GL_ONE_MINUS_SRC_ALPHA};
			fog.BlendFunc = bf;
			layer2.AddChild(fog, 1);
			AddChild(layer2Node, 1);
			layer2Node.AddChild (layer2);

			layer2Node.RepeatForever(effect);
        }
开发者ID:KerwinMa,项目名称:CocosSharp,代码行数:29,代码来源:Issue631.cs


示例4: FadeThenRemove

 public void FadeThenRemove(float delta)
 {
     var seq = new CCSequence(
                        new CCFadeTo(1.0f, 0),
                        new CCCallFunc(RemoveSpriteAndBody));
     sprite.RunAction(seq);
 }
开发者ID:460189852,项目名称:cocos-sharp-samples,代码行数:7,代码来源:BodyNode.cs


示例5: CCSequence

        public CCSequence (params CCFiniteTimeAction[] actions) : base ()
        {

            Actions = new CCFiniteTimeAction[2];

            var prev = actions [0];

            // Can't call base(duration) because we need to calculate duration here
            float combinedDuration = 0.0f;
            foreach (CCFiniteTimeAction action in actions)
            {
                combinedDuration += action.Duration;
            }
            Duration = combinedDuration;

            if (actions.Length == 1)
            {
                InitCCSequence (prev, new CCExtraAction ());
            }
            else
            {
                // Basically what we are doing here is creating a whole bunch of 
                // nested CCSequences from the actions.
                for (int i = 1; i < actions.Length - 1; i++)
                {
                    prev = new CCSequence (prev, actions [i]);
                }

                InitCCSequence (prev, actions [actions.Length - 1]);
            }

        }
开发者ID:KerwinMa,项目名称:CocosSharp,代码行数:32,代码来源:CCSequence.cs


示例6: OnEnter

        public override void OnEnter()
        {
            base.OnEnter();

            Color = CCColor3B.Blue;
            Opacity = 255;

            // Make sure we set the Opacity to cascade or fadein action will not work correctly.
            Target1.IsOpacityCascaded = true;
            Target2.IsOpacityCascaded = true;

            // Define actions
            var moveUp = new CCMoveBy(1.0f, new CCPoint(0.0f, 50.0f));
            var moveDown = moveUp.Reverse();

            // A CCSequence action runs the list of actions in ... sequence!
            var moveSeq = new CCSequence(new CCEaseBackInOut(moveUp), new CCEaseBackInOut(moveDown));

            var repeatedAction = new CCRepeatForever(moveSeq);

            // A CCSpawn action runs the list of actions concurrently
            var dreamAction = new CCSpawn(new CCFadeIn(5.0f), new CCWaves(5.0f, new CCGridSize(10, 20), 5, 20, true, false));


            Target1.RunActions(dreamAction, repeatedAction);

            Target2.RunActions(dreamAction, new CCDelayTime(0.5f), repeatedAction);

            // moving background. Testing issue #244
            var move = new CCMoveBy (3, new CCPoint(200, 0));

            bgNode.RepeatForever(move, move.Reverse());
        }
开发者ID:KevinHeyer,项目名称:CocosSharp,代码行数:33,代码来源:Effect3.cs


示例7: GameLayer

        public GameLayer()
            : base(CCColor4B.Blue, CCColor4B.AliceBlue)
        {
            // Set the layer gradient direction
            this.Vector = new CCPoint(0.5f, 0.5f);

            // Create and add sprites
            monkeySprite1 = new CCSprite("monkey");
            AddChild(monkeySprite1, 1);

            monkeySprite2 = new CCSprite("monkey");
            AddChild(monkeySprite2, 1);

            // Define actions
            var moveUp = new CCMoveBy(1.0f, new CCPoint(0.0f, 50.0f));
            var moveDown = moveUp.Reverse();

            // A CCSequence action runs the list of actions in ... sequence!
            CCSequence moveSeq = new CCSequence(new CCEaseBackInOut(moveUp), new CCEaseBackInOut(moveDown));

            repeatedAction = new CCRepeatForever(moveSeq);

            // A CCSpawn action runs the list of actions concurrently
            dreamAction = new CCSpawn(new CCFadeIn(5.0f), new CCWaves(5.0f, new CCGridSize(10, 20), 4, 4));

            // Schedule for method to be called every 0.1s
            Schedule(UpdateLayerGradient, 0.1f);
        }
开发者ID:460189852,项目名称:cocos-sharp-samples,代码行数:28,代码来源:GameLayer.cs


示例8: StressTest2

        public StressTest2()
        {
			var sublayer = new CCLayer();

			var sp1 = new CCSprite(TestResource.s_pPathSister1);
            

			var move = new CCMoveBy (3, new CCPoint(350, 0));
			var move_ease_inout3 = new CCEaseInOut(move, 2.0f);
			var move_ease_inout_back3 = move_ease_inout3.Reverse();
			var seq3 = new CCSequence(move_ease_inout3, move_ease_inout_back3);
			sp1.RepeatForever(seq3);

            sublayer.AddChild(sp1, 1, CocosNodeTestStaticLibrary.kTagSprite2);

			var fire = new CCParticleFire(CCPoint.Zero) { Tag = CocosNodeTestStaticLibrary.kTagSprite3 };
            fire.Texture = (CCTextureCache.SharedTextureCache.AddImage("Images/fire"));

			fire.RepeatForever(seq3);
            sublayer.AddChild(fire, 2);

            Schedule(shouldNotLeak, 6.0f);

            AddChild(sublayer, 0, CocosNodeTestStaticLibrary.kTagSprite1);
        }
开发者ID:h7ing,项目名称:CocosSharp,代码行数:25,代码来源:StressTest2.cs


示例9: OnEnter

        public override void OnEnter()
        {
            base.OnEnter();

            CCSize winSize = VisibleBoundsWorldspace.Size;
            float x = winSize.Center.X;
            float y = winSize.Center.Y;

            //var widgetSize = _widget->getContentSize();

            var moveTo = new CCMoveBy(1.0f, new CCPoint(30, 0));
            var moveBack = moveTo.Reverse();
            var rotateBy = new CCRotateBy(1.0f, 180);
            var scaleBy = new CCScaleTo(1.0f, -2.0f);
            var action = new CCSequence(moveTo, moveBack, rotateBy, scaleBy);


            var normalSprite1 = new CCSprite("Images/animationbuttonnormal.png");
            normalSprite1.Position = winSize.Center;
            normalSprite1.PositionX -= 100;
            normalSprite1.PositionY += 100;
            normalSprite1.FlipY = true;


            AddChild(normalSprite1);
            normalSprite1.RunAction(action);

            var normalSprite2 = new CCScale9Sprite("Images/animationbuttonnormal.png");
            normalSprite2.Position = winSize.Center;
            normalSprite2.PositionX -= 80;
            normalSprite2.PositionY += 100;
            normalSprite2.IsScale9Enabled = false;
            normalSprite2.Opacity = 100;
            AddChild(normalSprite2);
            normalSprite2.Color = CCColor3B.Green;
            normalSprite2.RunAction(action);

            
            var sp1 = new CCScale9Sprite("Images/animationbuttonnormal.png");
            sp1.Position = winSize.Center;
            sp1.PositionX -= 100;
            sp1.PositionY -= 50;
            sp1.Scale = 1.2f;
            sp1.ContentSize = new CCSize(100, 100);
            sp1.Color = CCColor3B.Green;
            AddChild(sp1);
            sp1.RunAction(action);

            var sp2 = new CCScale9Sprite("Images/animationbuttonnormal.png");
            sp2.Position = winSize.Center;
            sp2.PositionX += 100;
            sp2.PositionY -= 50;
            sp2.PreferredSize = sp1.ContentSize * 1.2f;
            sp2.ContentSize = new CCSize(100, 100);
            sp2.Color = CCColor3B.Green;
            AddChild(sp2);
            sp2.RunAction(action);

        }
开发者ID:haithemaraissia,项目名称:CocosSharp,代码行数:59,代码来源:Scale9SpriteTest.cs


示例10: OnEnter

        public override void OnEnter() {
            base.OnEnter();

            var move = new CCActionEase(new CCMoveBy(1, new CCPoint(0, 20)));

            var moveSeq = new CCSequence(move, move.Reverse());
            AddAction(new CCRepeatForever(moveSeq));
        }
开发者ID:Insality,项目名称:essence-of-shadows,代码行数:8,代码来源:HealPot.cs


示例11: disableMenuCallback

        public void disableMenuCallback(object pSender)
        {
            menu1.Enabled = false;
            var wait = new CCDelayTime (5);
            var enable = new CCCallFunc(enableMenuCallback);

            var seq = new CCSequence(wait, enable);
            menu1.RunAction(seq);
        }
开发者ID:KevinHeyer,项目名称:CocosSharp,代码行数:9,代码来源:MenuLayerPriorityTest.cs


示例12: CCSequenceState

        public CCSequenceState (CCSequence action, CCNode target)
            : base (action, target)
        { 
            actionSequences = action.Actions;
            hasInfiniteAction = (actionSequences [0] is CCRepeatForever) || (actionSequences [1] is CCRepeatForever);
            split = actionSequences [0].Duration / Duration;
            last = -1;

        }
开发者ID:KerwinMa,项目名称:CocosSharp,代码行数:9,代码来源:CCSequence.cs


示例13: Parallax1

        public Parallax1()
        {
            // Top Layer, a simple image
            CCSprite cocosImage = new CCSprite(s_Power);
            // scale the image (optional)
            cocosImage.Scale = 2.5f;
            // change the transform anchor point to 0,0 (optional)
            cocosImage.AnchorPoint = new CCPoint(0, 0);


//            // Middle layer: a Tile map atlas
//            CCTileMapAtlas tilemap = new CCTileMapAtlas(s_TilesPng, s_LevelMapTga, 16, 16);
//            tilemap.ReleaseMap();
//
//            // change the transform anchor to 0,0 (optional)
//            tilemap.AnchorPoint = new CCPoint(0, 0);
//
//            // Anti Aliased images
//			tilemap.IsAntialiased = true;


            // background layer: another image
            CCSprite background = new CCSprite(TestResource.s_back);
            // scale the image (optional)
            background.Scale = 1.5f;
            // change the transform anchor point (optional)
            background.AnchorPoint = new CCPoint(0, 0);


            // create a void node, a parent node
            CCParallaxNode voidNode = new CCParallaxNode();

            // NOW add the 3 layers to the 'void' node

            // background image is moved at a ratio of 0.4x, 0.5y
            voidNode.AddChild(background, -1, new CCPoint(0.4f, 0.5f), new CCPoint(0, 0));

            // tiles are moved at a ratio of 2.2x, 1.0y
//            voidNode.AddChild(tilemap, 1, new CCPoint(2.2f, 1.0f), new CCPoint(0, -200));

            // top image is moved at a ratio of 3.0x, 2.5y
            voidNode.AddChild(cocosImage, 2, new CCPoint(3.0f, 2.5f), new CCPoint(200, 800));


            // now create some actions that will move the 'void' node
            // and the children of the 'void' node will move at different
            // speed, thus, simulation the 3D environment
            CCMoveBy goUp = new CCMoveBy (4, new CCPoint(0, -500));
            CCFiniteTimeAction goDown = goUp.Reverse();
            CCMoveBy go = new CCMoveBy (8, new CCPoint(-1000, 0));
            CCFiniteTimeAction goBack = go.Reverse();
            CCFiniteTimeAction seq = new CCSequence(goUp, go, goDown, goBack);

            voidNode.RunAction(new CCRepeatForever ((CCFiniteTimeAction) seq));

            AddChild(voidNode, -1, kTagTileMap);
        }
开发者ID:KevinHeyer,项目名称:CocosSharp,代码行数:57,代码来源:Parallax1.cs


示例14: disableMenuCallback

        public void disableMenuCallback(object pSender)
        {
            m_pMenu1.Enabled = false;
            CCDelayTime wait = new CCDelayTime (5);
            CCCallFunc enable = new CCCallFunc(enableMenuCallback);

            CCFiniteTimeAction seq = new CCSequence(wait, enable);
            m_pMenu1.RunAction(seq);
        }
开发者ID:h7ing,项目名称:CocosSharp,代码行数:9,代码来源:MenuLayerPriorityTest.cs


示例15: OnEnter

        public override void OnEnter()
        {
            base.OnEnter();

            CCSize s = Layer.VisibleBoundsWorldspace.Size;

			var progressTo = new CCProgressTo(6, 100);
			var tint = new CCSequence(new CCTintTo (1, 255, 0, 0),
                                              new CCTintTo (1, 0, 255, 0),
                                              new CCTintTo (1, 0, 0, 255));
			var fade = new CCSequence(new CCFadeTo (1.0f, 0),
                                              new CCFadeTo (1.0f, 255));

            CCProgressTimer left = new CCProgressTimer(new CCSprite(s_pPathSister1));
            left.Type = CCProgressTimerType.Bar;

            //    Setup for a bar starting from the bottom since the midpoint is 0 for the y
            left.Midpoint = new CCPoint(0.5f, 0.5f);
            //    Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
            left.BarChangeRate = new CCPoint(1, 0);
            AddChild(left);
            left.Position = new CCPoint(100, s.Height / 2);
			left.RepeatForever(progressTo);
			left.RepeatForever(tint);

            left.AddChild(new CCLabelTtf("Tint", "arial", 20.0f));

            CCProgressTimer middle = new CCProgressTimer(new CCSprite(s_pPathSister2));
            middle.Type = CCProgressTimerType.Bar;
            //    Setup for a bar starting from the bottom since the midpoint is 0 for the y
            middle.Midpoint = new CCPoint(0.5f, 0.5f);
            //    Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
            middle.BarChangeRate = new CCPoint(1, 1);
            AddChild(middle);
            middle.Position = new CCPoint(s.Width / 2, s.Height / 2);
			middle.RepeatForever(progressTo);
			middle.RepeatForever(fade);

            middle.AddChild(new CCLabelTtf("Fade", "arial", 20.0f));

            CCProgressTimer right = new CCProgressTimer(new CCSprite(s_pPathSister2));
            right.Type = CCProgressTimerType.Bar;
            //    Setup for a bar starting from the bottom since the midpoint is 0 for the y
            right.Midpoint = new CCPoint(0.5f, 0.5f);
            //    Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
            right.BarChangeRate = new CCPoint(0, 1);
            AddChild(right);
            right.Position = new CCPoint(s.Width - 100, s.Height / 2);
			right.RepeatForever(progressTo);
			right.RepeatForever(tint);
			right.RepeatForever(fade);

            right.AddChild(new CCLabelTtf("Tint and Fade", "arial", 20.0f));
        }
开发者ID:KerwinMa,项目名称:CocosSharp,代码行数:54,代码来源:SpriteProgressBarTintAndFade.cs


示例16: SpriteAliased

        public SpriteAliased()
        {
            sprite1 = new CCSprite("Images/grossini_dance_atlas", new CCRect(85 * 1, 121 * 1, 85, 121));
            AddChild(sprite1, 0, (int)kTagSprite.kTagSprite1);

            sprite2 = new CCSprite("Images/grossini_dance_atlas", new CCRect(85 * 1, 121 * 1, 85, 121));
            AddChild(sprite2, 0, (int)kTagSprite.kTagSprite2);

            var scale = new CCScaleBy(2, 5);
            var scale_back = scale.Reverse();
            seq = new CCSequence(scale, scale_back);

        }
开发者ID:h7ing,项目名称:CocosSharp,代码行数:13,代码来源:SpriteAliased.cs


示例17: Atlas4

        public Atlas4()
        {
            m_time = 0;

            // Upper Label
			label = new CCLabelBMFont("Bitmap Font Atlas", "fonts/bitmapFontTest.fnt");
            AddChild(label);

			label.AnchorPoint = CCPoint.AnchorMiddle;


			var BChar = (CCSprite)label[0];
			var FChar = (CCSprite)label[7];
			var AChar = (CCSprite)label[12];


			var rotate = new CCRotateBy (2, 360);
			var rot_4ever = new CCRepeatForever (rotate);

			var scale = new CCScaleBy(2, 1.5f);
			var scale_back = scale.Reverse();
			var scale_seq = new CCSequence(scale, scale_back);
			var scale_4ever = new CCRepeatForever (scale_seq);

            var jump = new CCJumpBy (0.5f, new CCPoint(), 60, 1);
            var jump_4ever = new CCRepeatForever (jump);

			var fade_out = new CCFadeOut  (1);
			var fade_in = new CCFadeIn  (1);
			var seq = new CCSequence(fade_out, fade_in);
			var fade_4ever = new CCRepeatForever (seq);

            BChar.RunAction(rot_4ever);
            BChar.RunAction(scale_4ever);
            FChar.RunAction(jump_4ever);
			AChar.RunAction(fade_4ever);


            // Bottom Label
			label2 = new CCLabelBMFont("00.0", "fonts/bitmapFontTest.fnt");
            AddChild(label2, 0, (int)TagSprite.kTagBitmapAtlas2);

			var lastChar = (CCSprite)label2[3];
            lastChar.RunAction(rot_4ever);

            //schedule( schedule_selector(Atlas4::step), 0.1f);
            base.Schedule(step, 0.1f);
        }
开发者ID:KevinHeyer,项目名称:CocosSharp,代码行数:48,代码来源:Atlas4.cs


示例18: SpriteOffsetAnchorFlip

        public SpriteOffsetAnchorFlip()
        {
            CCSpriteFrameCache cache = CCSpriteFrameCache.SharedSpriteFrameCache;
            cache.AddSpriteFrames("animations/grossini.plist");
            cache.AddSpriteFrames("animations/grossini_gray.plist", "animations/grossini_gray");

            var animFrames = new List<CCSpriteFrame>();
            string tmp = "";
            for (int j = 0; j < 14; j++)
            {
                string temp = "";
                if (j +1< 10)
                {
                    temp = "0" + (j + 1);
                }
                else
                {
                    temp = (j + 1).ToString();
                }
                tmp = string.Format("grossini_dance_{0}.png", temp);
                CCSpriteFrame frame = cache[tmp];
                animFrames.Add(frame);
            }

            animation = new CCAnimation(animFrames, 0.3f);

            var flip = new CCFlipY(true);
            var flip_back = flip.Reverse();
            var delay = new CCDelayTime (1);

            seq = new CCSequence(delay, flip, delay, flip_back);

            sprites = new CCSprite[numOfSprites];
            pointSprites = new CCSprite[numOfSprites];

            for(int i = 0; i < numOfSprites; i++)
            {
                // Animation using Sprite batch
                sprites[i] = new CCSprite("grossini_dance_01.png");
                AddChild(sprites[i], 0);

                pointSprites[i] = new CCSprite("Images/r1");
                AddChild(pointSprites[i], 1);
            }
        }
开发者ID:KerwinMa,项目名称:CocosSharp,代码行数:45,代码来源:SpriteOffsetAnchorFlip.cs


示例19: InitCCSpawn

        private void InitCCSpawn (CCFiniteTimeAction action1, CCFiniteTimeAction action2)
        {
            Debug.Assert (action1 != null);
            Debug.Assert (action2 != null);

            float d1 = action1.Duration;
            float d2 = action2.Duration;

            ActionOne = action1;
            ActionTwo = action2;

            if (d1 > d2)
            {
                ActionTwo = new CCSequence (action2, new CCDelayTime (d1 - d2));
            }
            else if (d1 < d2)
            {
                ActionOne = new CCSequence (action1, new CCDelayTime (d2 - d1));
            }
        }
开发者ID:h7ing,项目名称:CocosSharp,代码行数:20,代码来源:CCSpawn.cs


示例20: OnEnter

        public override void OnEnter()
        {
            base.OnEnter();

			var effect = new CCSequence(new CCDelayTime (2.0f), new CCShaky3D(5.0f, new CCGridSize(5, 5), 16, false));

            // cleanup
			contentLayer.RemoveChild(bgNode, true);

            // background
            var layer = new CCDrawNode();
            layer.Color = CCColor3B.Red;
            layer.Opacity = 255;

            layer.DrawRect(VisibleBoundsWorldspace);

            AddChild(layer, -10);

			var sprite = new CCSprite("Images/grossini");
            sprite.Position = new CCPoint(50, 80);
            layer.AddChild(sprite, 10);

            // foreground
            var layer2BaseGrid = new CCNodeGrid ();
            var layer2 = new CCDrawNode();
            layer2.Color = CCColor3B.Green;
            layer2.Opacity = 255;
			
            layer2.DrawRect(VisibleBoundsWorldspace);

			var fog = new CCSprite("Images/Fog");

			var bf = new CCBlendFunc {Source = CCOGLES.GL_SRC_ALPHA, Destination = CCOGLES.GL_ONE_MINUS_SRC_ALPHA};
			fog.BlendFunc = bf;
			layer2.AddChild(fog, 1);
			AddChild(layer2BaseGrid, 1);
			layer2BaseGrid.AddChild (layer2);

			layer2BaseGrid.RepeatForever(effect);
        }
开发者ID:KevinHeyer,项目名称:CocosSharp,代码行数:40,代码来源:Issue631.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CocosSharp.CCSprite类代码示例发布时间:2022-05-24
下一篇:
C# CocosSharp.CCScene类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap