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


C# Animation.PlayThen方法代码示例

本文整理汇总了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));
 }
开发者ID:JamesDunne,项目名称:OpenRA,代码行数:7,代码来源:IonCannon.cs

示例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)));
 }
开发者ID:nevelis,项目名称:OpenRA,代码行数:7,代码来源:Corpse.cs

示例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)));
 }
开发者ID:JamesDunne,项目名称:OpenRA,代码行数:7,代码来源:Smoke.cs

示例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)));
 }
开发者ID:mgatland,项目名称:OpenRA,代码行数:7,代码来源:Explosion.cs

示例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)));
		}
开发者ID:JackKucan,项目名称:OpenRA,代码行数:7,代码来源:SpriteEffect.cs

示例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 } );
 }
开发者ID:patthoyts,项目名称:OpenRA,代码行数:7,代码来源:WithFire.cs

示例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);
        }
开发者ID:RobotCaleb,项目名称:OpenRA,代码行数:31,代码来源:Parachute.cs

示例8: IonCannon

 public IonCannon(Actor firedBy, World world, int2 location)
 {
     this.firedBy = firedBy;
     Target = location;
     anim = new Animation("ionsfx");
     anim.PlayThen("idle", () => Finish(world));
 }
开发者ID:comradpara,项目名称:OpenRA,代码行数:7,代码来源:IonCannon.cs

示例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)));
 }
开发者ID:comradpara,项目名称:OpenRA,代码行数:8,代码来源:Explosion.cs

示例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)));
 }
开发者ID:Generalcamo,项目名称:OpenRA,代码行数:8,代码来源:Explosion.cs

示例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)));
        }
开发者ID:ushardul,项目名称:OpenRA,代码行数:8,代码来源:CrateEffect.cs

示例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)));
 }
开发者ID:CH4Code,项目名称:OpenRA,代码行数:8,代码来源:Explosion.cs

示例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));
 }
开发者ID:RunCraze,项目名称:OpenRA,代码行数:9,代码来源:IonCannon.cs

示例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;
		}
开发者ID:JackKucan,项目名称:OpenRA,代码行数:9,代码来源:SatelliteLaunch.cs

示例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)));
 }
开发者ID:RobotCaleb,项目名称:OpenRA,代码行数:9,代码来源:Corpse.cs


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