Files
OpenRA/OpenRa.Game/Mcv.cs
chrisf b90f1859c2 TELEPORTING HAX
git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1279 993157c7-ee19-0410-b2c4-bb4e9862e678
2007-07-15 16:36:35 +00:00

40 lines
786 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using OpenRa.FileFormats;
using System.Drawing;
using BluntDirectX.Direct3D;
namespace OpenRa.Game
{
class Mcv : Actor
{
static Range<int>? mcvRange = null;
public Mcv( float2 location, int palette )
{
this.location = location;
this.palette = palette;
if (mcvRange == null)
mcvRange = UnitSheetBuilder.AddUnit("mcv");
}
int GetFacing() { return (Environment.TickCount >> 6) % 32; }
public override Sprite[] CurrentImages
{
get
{
return new Sprite[] { UnitSheetBuilder.sprites[GetFacing() + mcvRange.Value.Start] };
}
}
public void Accept(MoveOrder o)
{
// HACK HACK HACK TELEPORT
this.location = o.Destination;
}
}
}