本文整理汇总了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 ) ) );
}
示例2: Tick
public void Tick( World world )
{
doors.Tick();
if (++frame == 19)
world.AddFrameEndTask(w => w.Add(new GpsSatellite(world, pos)));
}
示例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));
}
}
示例4: Tick
public void Tick(World world)
{
if (ar.IsCompleted)
{
world.AddFrameEndTask(w => { w.Remove(this); a(); });
}
}
示例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)));
}
示例6: Tick
public void Tick(World world)
{
if (ticks++ == trail.Length)
world.AddFrameEndTask(w => w.Remove(this));
trail.Update(pos);
}
示例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)));
}
示例8: Tick
public void Tick(World world)
{
if (self.IsDead)
world.AddFrameEndTask(w => w.Remove(this));
else
anim.Tick();
}
示例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)));
}
示例10: Tick
public void Tick(World world)
{
if (!a.IsInWorld || a.IsDead() || !a.Trait<CanPowerDown>().Disabled)
world.AddFrameEndTask(w => w.Remove(this));
anim.Tick();
}
示例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)));
}
示例12: Tick
public void Tick(World world)
{
if (!building.IsInWorld || building.IsDead || !rb.Repairers.Any())
world.AddFrameEndTask(w => w.Remove(this));
anim.Tick();
}
示例13: Tick
public void Tick(World world)
{
if (--remaining <= 0)
world.AddFrameEndTask(w => w.Remove(this));
pos += velocity;
}
示例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)));
}
示例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));
}