merged. may not actually work yet.
This commit is contained in:
@@ -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) {}
|
||||
}
|
||||
}
|
||||
39
OpenRa.Game/SupportPowers/ChronospherePower.cs
Normal file
39
OpenRa.Game/SupportPowers/ChronospherePower.cs
Normal 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user