當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。