merged. may not actually work yet.

This commit is contained in:
Chris Forbes
2010-01-09 11:34:44 +13:00
10 changed files with 66 additions and 65 deletions

View File

@@ -1,19 +0,0 @@
using OpenRa.Game.Orders;
namespace OpenRa.Game.SupportPowers
{
class Chronoshift : ISupportPowerImpl
{
public void Activate(SupportPower p)
{
// todo: someone has to call SupportPower.FinishActivate when we're done!
if (Game.controller.ToggleInputMode<ChronosphereSelectOrderGenerator>())
Sound.Play("slcttgt1.aud");
}
public void OnFireNotification(Actor target, int2 xy) {}
public void IsChargingNotification(SupportPower p) {}
public void IsReadyNotification(SupportPower p) {}
}
}

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing;
using OpenRa.Game.Orders;
using OpenRa.Game.Traits;
namespace OpenRa.Game.SupportPowers
{
class ChronospherePower : ISupportPowerImpl
{
public void IsReadyNotification(SupportPower p) { Sound.Play("chrordy1.aud"); }
public void IsChargingNotification(SupportPower p) { Sound.Play("chrochr1.aud"); }
public void OnFireNotification(Actor target, int2 xy)
{
p.FinishActivate();
Game.controller.CancelInputMode();
Sound.Play("chrono2.aud");
foreach (var a in Game.world.Actors.Where(a => a.traits.Contains<ChronoshiftPaletteEffect>()))
a.traits.Get<ChronoshiftPaletteEffect>().DoChronoshift();
// Play chronosphere active anim
var chronosphere = Game.world.Actors.Where(a => a.Owner == p.Owner && a.traits.Contains<Chronosphere>()).FirstOrDefault();
if (chronosphere != null)
chronosphere.traits.Get<RenderBuilding>().PlayCustomAnim(chronosphere, "active");
}
SupportPower p;
public void Activate(SupportPower p)
{
this.p = p;
Game.controller.orderGenerator = new ChronosphereSelectOrderGenerator(this);
Sound.Play("slcttgt1.aud");
}
}
}

View File

@@ -1,15 +0,0 @@
using OpenRa.Game.Orders;
namespace OpenRa.Game.SupportPowers
{
class IronCurtain : ISupportPowerImpl
{
public void Activate(SupportPower p)
{
// todo: someone has to call SupportPower.FinishActivate when we're done!
if (Game.controller.ToggleInputMode<IronCurtainOrderGenerator>())
Sound.Play("slcttgt1.aud");
}
}
}