start of demolition support

This commit is contained in:
Chris Forbes
2009-12-28 18:58:40 +13:00
parent 71a8f86b2c
commit ce69c98270
4 changed files with 65 additions and 4 deletions

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRa.Game.Traits.Activities
{
class Demolish : IActivity
{
Actor target;
public IActivity NextActivity { get; set; }
public Demolish( Actor target )
{
this.target = target;
}
public IActivity Tick(Actor self)
{
if (target == null || target.IsDead) return NextActivity;
// 1. run to adj tile
// 2. spawn timed demolition (for +3/4s)
// 3. run away --- where?
return this;
}
public void Cancel(Actor self) { target = null; NextActivity = null; }
}
}