本文整理汇总了C#中OpenRA.Graphics.Animation.PlayThen方法的典型用法代码示例。如果您正苦于以下问题:C# Animation.PlayThen方法的具体用法?C# Animation.PlayThen怎么用?C# Animation.PlayThen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenRA.Graphics.Animation
的用法示例。
在下文中一共展示了Animation.PlayThen方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IonCannon
public IonCannon(Actor firedBy, World world, CPos location)
{
this.firedBy = firedBy;
target = Target.FromCell(location);
anim = new Animation("ionsfx");
anim.PlayThen("idle", () => Finish(world));
}
示例2: 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)));
}
示例3: 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)));
}
示例4: 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)));
}
示例5: 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)));
}
示例6: WithFire
public WithFire(Actor self)
{
var rs = self.Trait<RenderSimple>();
var roof = new Animation(rs.GetImage(self));
roof.PlayThen("fire-start", () => roof.PlayRepeating("fire-loop"));
rs.anims.Add( "fire", new RenderSimple.AnimationWithOffset( roof, () => new float2(7,-15), null ) { ZOffset = 24 } );
}
示例7: Parachute
public Parachute(Actor cargo, WPos dropPosition)
{
this.cargo = cargo;
parachutableInfo = cargo.Info.Traits.GetOrDefault<ParachutableInfo>();
if (parachutableInfo != null)
fallVector = new WVec(0, 0, parachutableInfo.FallRate);
var parachuteSprite = parachutableInfo != null ? parachutableInfo.ParachuteSequence : null;
if (parachuteSprite != null)
{
parachute = new Animation(cargo.World, parachuteSprite);
parachute.PlayThen("open", () => parachute.PlayRepeating("idle"));
}
var shadowSprite = parachutableInfo != null ? parachutableInfo.ShadowSequence : null;
if (shadowSprite != null)
{
shadow = new Animation(cargo.World, shadowSprite);
shadow.PlayRepeating("idle");
}
if (parachutableInfo != null)
parachuteOffset = parachutableInfo.ParachuteOffset;
// Adjust x,y to match the target subcell
cargo.Trait<IPositionable>().SetPosition(cargo, cargo.World.Map.CellContaining(dropPosition));
var cp = cargo.CenterPosition;
pos = new WPos(cp.X, cp.Y, dropPosition.Z);
}
示例8: IonCannon
public IonCannon(Actor firedBy, World world, int2 location)
{
this.firedBy = firedBy;
Target = location;
anim = new Animation("ionsfx");
anim.PlayThen("idle", () => Finish(world));
}
示例9: Explosion
public Explosion(World world, int2 pixelPos, int style, bool isWater)
{
this.pos = pixelPos;
var variantSuffix = isWater ? "w" : "";
anim = new Animation("explosion");
anim.PlayThen(style.ToString() + variantSuffix,
() => world.AddFrameEndTask(w => w.Remove(this)));
}
示例10: 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)));
}
示例11: CrateEffect
public CrateEffect(Actor a, string seq, string palette)
{
this.a = a;
this.palette = palette;
anim = new Animation(a.World, "crate-effects");
anim.PlayThen(seq, () => a.World.AddFrameEndTask(w => w.Remove(this)));
}
示例12: Explosion
public Explosion(World world, WPos pos, string image, string sequence, string palette)
{
this.world = world;
this.pos = pos;
this.palette = palette;
anim = new Animation(world, image);
anim.PlayThen(sequence, () => world.AddFrameEndTask(w => w.Remove(this)));
}
示例13: IonCannon
public IonCannon(Player firedBy, string weapon, World world, CPos location, string effect, string palette)
{
this.firedBy = firedBy;
this.weapon = weapon;
this.palette = palette;
target = Target.FromCell(location);
anim = new Animation(world, effect);
anim.PlayThen("idle", () => Finish(world));
}
示例14: SatelliteLaunch
public SatelliteLaunch(Actor a)
{
doors = new Animation(a.World, "atek");
doors.PlayThen("active",
() => a.World.AddFrameEndTask(w => w.Remove(this)));
pos = a.CenterPosition;
}
示例15: Corpse
public Corpse(World world, WPos pos, string image, string sequence, string paletteName)
{
this.world = world;
this.pos = pos;
this.cell = world.Map.CellContaining(pos);
this.paletteName = paletteName;
anim = new Animation(world, image);
anim.PlayThen(sequence, () => world.AddFrameEndTask(w => w.Remove(this)));
}