moved gps into mod
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using OpenRa.Graphics;
|
||||
using OpenRa.Traits;
|
||||
|
||||
namespace OpenRa.Effects
|
||||
{
|
||||
class GpsSatellite : IEffect
|
||||
{
|
||||
readonly float heightPerTick = 10;
|
||||
float2 offset;
|
||||
Animation anim = new Animation("sputnik");
|
||||
|
||||
public GpsSatellite(float2 offset)
|
||||
{
|
||||
this.offset = offset;
|
||||
anim.PlayRepeating("idle");
|
||||
}
|
||||
|
||||
public void Tick( World world )
|
||||
{
|
||||
anim.Tick();
|
||||
offset.Y -= heightPerTick;
|
||||
|
||||
if (offset.Y < 0)
|
||||
world.AddFrameEndTask(w => w.Remove(this));
|
||||
}
|
||||
|
||||
public IEnumerable<Renderable> Render()
|
||||
{
|
||||
yield return new Renderable(anim.Image,offset, PaletteType.Gold);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using OpenRa.Graphics;
|
||||
using OpenRa.Traits;
|
||||
|
||||
namespace OpenRa.Effects
|
||||
{
|
||||
class SatelliteLaunch : IEffect
|
||||
{
|
||||
int frame = 0;
|
||||
Actor a;
|
||||
Animation doors = new Animation("atek");
|
||||
float2 doorOffset = new float2(-4,0);
|
||||
|
||||
public SatelliteLaunch(Actor a)
|
||||
{
|
||||
this.a = a;
|
||||
doors.PlayThen("active",
|
||||
() => a.World.AddFrameEndTask(w => w.Remove(this)));
|
||||
}
|
||||
|
||||
public void Tick( World world )
|
||||
{
|
||||
doors.Tick();
|
||||
|
||||
if (++frame == 19)
|
||||
{
|
||||
world.AddFrameEndTask(w => w.Add(new GpsSatellite(a.CenterLocation - .5f * doors.Image.size + doorOffset)));
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Renderable> Render()
|
||||
{
|
||||
yield return new Renderable(doors.Image,
|
||||
a.CenterLocation - .5f * doors.Image.size + doorOffset, PaletteType.Gold);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user