Files
OpenRA/OpenRA.Mods.RA/Effects/GpsSatellite.cs
Matthias Mailänder 167ba72119 Merge pull request #7246 from Hellhake/stylecop-ra
Fix StyleCop warnings in OpenRA.Mods.RA
2015-01-02 16:38:22 +01:00

45 lines
959 B
C#

#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using OpenRA.Effects;
using OpenRA.Graphics;
namespace OpenRA.Mods.RA.Effects
{
class GpsSatellite : IEffect
{
readonly Animation anim;
WPos pos;
public GpsSatellite(World world, WPos pos)
{
this.pos = pos;
anim = new Animation(world, "sputnik");
anim.PlayRepeating("idle");
}
public void Tick(World world)
{
anim.Tick();
pos += new WVec(0, 0, 427);
if (pos.Z > pos.Y)
world.AddFrameEndTask(w => w.Remove(this));
}
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
return anim.Render(pos, wr.Palette("effect"));
}
}
}