paratroopers

This commit is contained in:
Chris Forbes
2010-01-28 21:47:23 +13:00
parent 3eee141b79
commit 493ec984bf
11 changed files with 165 additions and 35 deletions

View File

@@ -27,7 +27,10 @@ namespace OpenRa.Effects
this.owner = owner;
anim = new Animation(image);
anim.PlayFetchIndex("idle", () => 0);
if (anim.HasSequence("idle"))
anim.PlayFetchIndex("idle", () => 0);
else
anim.PlayFetchIndex("stand", () => 0);
anim.Tick();
paraAnim = new Animation("parach");
@@ -44,10 +47,9 @@ namespace OpenRa.Effects
world.AddFrameEndTask(w =>
{
w.Remove(this);
cargo.CancelActivity();
cargo.CenterLocation = location;
cargo.Location = ((1 / 24f) * location).ToInt2();
w.Add(cargo);
cargo.CancelActivity();
cargo.traits.Get<Mobile>().TeleportTo(cargo, ((1 / 24f) * location).ToInt2());
});
}