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


C# CCLabelTtf.RepeatForever方法代码示例

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


在下文中一共展示了CCLabelTtf.RepeatForever方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LabelTTFA8Test

        public LabelTTFA8Test()
        {
			var layer = new CCLayerColor(new CCColor4B(128, 128, 128, 255));
            AddChild(layer, -10);

            // CCLabelBMFont
			label1 = new CCLabelTtf("Testing A8 Format", "MarkerFelt", 38);
            AddChild(label1);
            label1.Color = CCColor3B.Red;


			var fadeOut = new CCFadeOut  (2);
			var fadeIn = new CCFadeIn  (2);
			label1.RepeatForever(fadeIn, fadeOut);
        }
开发者ID:KerwinMa,项目名称:CocosSharp,代码行数:15,代码来源:LabelTTFA8Test.cs

示例2: AddTitle

        private void AddTitle() {
            var title = new CCLabelTtf(Settings.GameName, "kongtext", 28) {
                Color = CCColor3B.White,
                AnchorPoint = CCPoint.AnchorMiddleTop,
                PositionX = Settings.ScreenWidth/2,
                PositionY = 550,
            };

            var titleShadow = new CCLabelTtf(Settings.GameName, "kongtext", 28) {
                Color = new CCColor3B(100, 0, 220),
                AnchorPoint = CCPoint.AnchorMiddleTop,
                PositionX = Settings.ScreenWidth/2,
                PositionY = 550,
            };

            // Движение тени у текста с названием игры
            const int moveStreak = 30;
            var moves = new CCFiniteTimeAction[moveStreak];
            for (int i = 0; i < moveStreak; i++) {
                moves[i] = MoveAround();
            }
            titleShadow.RepeatForever(new CCSequence(moves));


            var helper = new CCLabelTtf("Enter/Space to start, Esc to exit", "kongtext", 10) {
                Color = CCColor3B.Gray,
                AnchorPoint = CCPoint.AnchorMiddleBottom,
                PositionX = Settings.ScreenWidth/2,
                PositionY = 0
            };

            AddChild(titleShadow);

            AddChild(title);
            AddChild(helper);
        }
开发者ID:Insality,项目名称:essence-of-shadows,代码行数:36,代码来源:MenuBackgroundLayer.cs

示例3: OnEnter

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

            m_nImageOffset = 0;

            CCSize size = Layer.VisibleBoundsWorldspace.Size;

            CCLabelTtf label = new CCLabelTtf("Loading...", "Marker Felt", 32);
            label.Position = size.Center;
            AddChild(label, 10);

			var scale = new CCScaleBy(0.3f, 2);
			label.RepeatForever(scale, scale.Reverse());

            ScheduleOnce(LoadImages, 1.0f);
        }
开发者ID:h7ing,项目名称:CocosSharp,代码行数:17,代码来源:Texture2dTest.cs

示例4: createParticlesAsync

		public void createParticlesAsync()
		{

			isLoading = true;


			var label = new CCLabelTtf("Loading...", "MarkerFelt", 22);
			label.Position = _screenSize.Center;
			label.Position = new CCPoint(_screenSize.Center.X, _screenSize.Height * 0.75f);

			label.Visible = false;
			label.Name = "Loading";
			AddChild(label, 10);

			var scale = new CCScaleBy(0.3f, 2);
			label.RunActions(new CCDelayTime(1.0f), new CCShow());
			label.RepeatForever(scale, scale.Reverse());



			CCParticleSystemCache.SharedParticleSystemCache.AddParticleSystemAsync("jet.plist",

				(jetConfig) =>
				{
					_jet = new CCParticleSystemQuad(jetConfig);
					_jet.SourcePosition = new CCPoint(-_rocket._radius * 0.8f, 0);
					_jet.Angle = 180;
					_jet.StopSystem();
					AddChild(_jet, kBackground);

					loadedParticleSystems++;
					updateLoading();
				});

			CCParticleSystemCache.SharedParticleSystemCache.AddParticleSystemAsync("boom.plist",

				(boomConfig) =>
				{
					_boom = new CCParticleSystemQuad(boomConfig);
					_boom.StopSystem();
					AddChild(_boom, kForeground);
					loadedParticleSystems++;
					updateLoading();
				});

			CCParticleSystemCache.SharedParticleSystemCache.AddParticleSystemAsync("comet.plist",

				(cometConfig) =>
				{
					_comet = new CCParticleSystemQuad(cometConfig);
					_comet.StopSystem();
					_comet.Position = new CCPoint(0, _screenSize.Height * 0.6f);
					_comet.Visible = false;
					AddChild(_comet, kForeground);
					loadedParticleSystems++;
					updateLoading();
				});


			CCParticleSystemCache.SharedParticleSystemCache.AddParticleSystemAsync("star.plist",

			   (starConfig) =>
			   {
				   _star = new CCParticleSystemQuad(starConfig);
				   _star.StopSystem();
				   _star.Visible = false;
				   AddChild(_star, kBackground, kSpriteStar);
				   loadedParticleSystems++;
				   updateLoading();
			   });

			CCParticleSystemCache.SharedParticleSystemCache.AddParticleSystemAsync("plink.plist",

				(plinkConfig) =>
				{
					_pickup = new CCParticleSystemQuad(plinkConfig);
					_pickup.StopSystem();
					AddChild(_pickup, kMiddleground);
					loadedParticleSystems++;
					updateLoading();
				});


			CCParticleSystemCache.SharedParticleSystemCache.AddParticleSystemAsync("warp.plist",

				(warpConfig) =>
				{
					_warp = new CCParticleSystemQuad(warpConfig);
					_warp.Position = _rocket.Position;
					AddChild(_warp, kBackground);
					loadedParticleSystems++;
					updateLoading();
				});


		}
开发者ID:460189852,项目名称:cocos-sharp-samples,代码行数:96,代码来源:IntroLayer.cs


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