unhacking Player and World actors

This commit is contained in:
Chris Forbes
2010-01-14 17:17:23 +13:00
parent 1557a77fec
commit a3ba286b06
6 changed files with 14 additions and 15 deletions

View File

@@ -3,16 +3,13 @@ using OpenRa.Game.Graphics;
namespace OpenRa.Game.Traits
{
// this is NOT bound through rules (it belongs on the world actor!)
// so no *Info required
class ChronoshiftPaletteEffectInfo : StatelessTraitInfo<ChronoshiftPaletteEffect> { }
class ChronoshiftPaletteEffect : IPaletteModifier, ITick
{
const int chronoEffectLength = 20;
int remainingFrames;
public ChronoshiftPaletteEffect(Actor self) { }
public void DoChronoshift()
{
remainingFrames = chronoEffectLength;

View File

@@ -2,13 +2,10 @@
namespace OpenRa.Game.Traits
{
// this is NOT bound through rules (it belongs on the world actor!)
// so no *Info required
class WaterPaletteRotationInfo : StatelessTraitInfo<WaterPaletteRotation> { }
class WaterPaletteRotation : ITick, IPaletteModifier
{
public WaterPaletteRotation(Actor self) { }
float t = 0;
public void Tick(Actor self)
{