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


C# World.AddFrameEndTask方法代码示例

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


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

示例1: MoveFlash

 public MoveFlash( World world, int2 cell )
 {
     this.pos = Game.CellSize * (cell + new float2(0.5f, 0.5f));
     anim.PlayThen( "idle",
         () => world.AddFrameEndTask(
             w => w.Remove( this ) ) );
 }
开发者ID:pdovy,项目名称:OpenRA,代码行数:7,代码来源:MoveFlash.cs

示例2: Tick

		public void Tick( World world )
		{
			doors.Tick();

			if (++frame == 19)
				world.AddFrameEndTask(w => w.Add(new GpsSatellite(world, pos)));
		}
开发者ID:JackKucan,项目名称:OpenRA,代码行数:7,代码来源:SatelliteLaunch.cs

示例3: AirstrikePowerASEffect

		public AirstrikePowerASEffect(World world, Player p, WPos pos, IEnumerable<Actor> planes, AirstrikePowerASInfo info)
		{
			this.info = info;
			this.world = world;
			this.Owner = p;
			this.pos = pos;
			this.planes = planes;

			if (info.DisplayBeacon)
			{
				var distance = (planes.First().OccupiesSpace.CenterPosition - pos).HorizontalLength;

				beacon = new Beacon(
					Owner,
					pos - new WVec(WDist.Zero, WDist.Zero, world.Map.DistanceAboveTerrain(pos)),
					info.BeaconPaletteIsPlayerPalette,
					info.BeaconPalette,
					info.BeaconImage,
					info.BeaconPoster,
					info.BeaconPosterPalette,
					info.ArrowSequence,
					info.CircleSequence,
					info.ClockSequence,
						() => 1 - ((planes.First().OccupiesSpace.CenterPosition - pos).HorizontalLength - info.BeaconDistanceOffset.Length) * 1f / distance);

				world.AddFrameEndTask(w => w.Add(beacon));
			}
		}
开发者ID:GraionDilach,项目名称:OpenRA.Mods.AS,代码行数:28,代码来源:AirstrikePowerASEffect.cs

示例4: Tick

		public void Tick(World world)
		{
			if (ar.IsCompleted)
			{
				world.AddFrameEndTask(w => { w.Remove(this); a(); });
			}
		}
开发者ID:Roger-luo,项目名称:OpenRA,代码行数:7,代码来源:AsyncAction.cs

示例5: Smoke

 public Smoke(World world, PPos pos, string trail)
 {
     this.pos = pos;
     anim = new Animation(trail);
     anim.PlayThen("idle",
         () => world.AddFrameEndTask(w => w.Remove(this)));
 }
开发者ID:JamesDunne,项目名称:OpenRA,代码行数:7,代码来源:Smoke.cs

示例6: Tick

        public void Tick(World world)
        {
            if (ticks++ == trail.Length)
                world.AddFrameEndTask(w => w.Remove(this));

            trail.Update(pos);
        }
开发者ID:CH4Code,项目名称:OpenRA,代码行数:7,代码来源:ContrailFader.cs

示例7: SpriteEffect

		public SpriteEffect(WPos pos, World world, string sprite, string palette)
		{
			this.pos = pos;
			this.palette = palette;
			anim = new Animation(world, sprite);
			anim.PlayThen("idle", () => world.AddFrameEndTask(w => w.Remove(this)));
		}
开发者ID:JackKucan,项目名称:OpenRA,代码行数:7,代码来源:SpriteEffect.cs

示例8: Tick

 public void Tick(World world)
 {
     if (self.IsDead)
         world.AddFrameEndTask(w => w.Remove(this));
     else
         anim.Tick();
 }
开发者ID:ushardul,项目名称:OpenRA,代码行数:7,代码来源:Rank.cs

示例9: Corpse

 public Corpse(World world, float2 pos, string image, string sequence, string paletteName)
 {
     this.pos = pos;
     this.paletteName = paletteName;
     anim = new Animation(image);
     anim.PlayThen(sequence, () => world.AddFrameEndTask(w => w.Remove(this)));
 }
开发者ID:nevelis,项目名称:OpenRA,代码行数:7,代码来源:Corpse.cs

示例10: Tick

        public void Tick(World world)
        {
            if (!a.IsInWorld || a.IsDead() || !a.Trait<CanPowerDown>().Disabled)
                world.AddFrameEndTask(w => w.Remove(this));

            anim.Tick();
        }
开发者ID:sonygod,项目名称:OpenRA-Dedicated-20120504,代码行数:7,代码来源:PowerdownIndicator.cs

示例11: Explosion

 public Explosion(World world, int2 pixelPos, string style, bool isWater)
 {
     this.pos = pixelPos;
     anim = new Animation("explosion");
     anim.PlayThen(style,
         () => world.AddFrameEndTask(w => w.Remove(this)));
 }
开发者ID:mgatland,项目名称:OpenRA,代码行数:7,代码来源:Explosion.cs

示例12: Tick

        public void Tick(World world)
        {
            if (!building.IsInWorld || building.IsDead || !rb.Repairers.Any())
                world.AddFrameEndTask(w => w.Remove(this));

            anim.Tick();
        }
开发者ID:CH4Code,项目名称:OpenRA,代码行数:7,代码来源:RepairIndicator.cs

示例13: Tick

        public void Tick(World world)
        {
            if (--remaining <= 0)
                world.AddFrameEndTask(w => w.Remove(this));

            pos += velocity;
        }
开发者ID:TiriliPiitPiit,项目名称:OpenRA,代码行数:7,代码来源:CashTick.cs

示例14: Explosion

 public Explosion(World world, WPos pos, string style)
 {
     this.world = world;
     this.pos = pos;
     this.cell = pos.ToCPos();
     anim = new Animation("explosion");
     anim.PlayThen(style, () => world.AddFrameEndTask(w => w.Remove(this)));
 }
开发者ID:Generalcamo,项目名称:OpenRA,代码行数:8,代码来源:Explosion.cs

示例15: Tick

        public void Tick(World world)
        {
            anim.Tick();
            pos += new WVec(0, 0, 427);

            if (pos.Z > pos.Y)
                world.AddFrameEndTask(w => w.Remove(this));
        }
开发者ID:gitTerebi,项目名称:OpenRA,代码行数:8,代码来源:GpsSatellite.cs


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