Chronosphere implementation plus supporting tweaks to Order

This commit is contained in:
Paul Chote
2010-01-09 00:53:48 +13:00
parent 86b0ee8c97
commit becfd6eef3
9 changed files with 79 additions and 45 deletions

View File

@@ -1,14 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRa.Game.GameRules;
using OpenRa.Game.Traits;
using OpenRa.Game.SupportPowers;
namespace OpenRa.Game.Orders
{
class ChronosphereSelectOrderGenerator : IOrderGenerator
{
ISupportPowerImpl chronospherePower;
public ChronosphereSelectOrderGenerator(ISupportPowerImpl chronospherePower)
{
this.chronospherePower = chronospherePower;
}
public IEnumerable<Order> Order(int2 xy, MouseInput mi)
{
if (mi.Button == MouseButton.Right)
@@ -31,7 +37,7 @@ namespace OpenRa.Game.Orders
if (unit != null)
{
yield return new Order("ChronosphereSelect", underCursor, null, int2.Zero, null);
yield return new Order("ChronosphereSelect", underCursor, null, int2.Zero, null, chronospherePower);
}
}
}