Nuke (cnc and ra). Still needs smoke anim in cnc.

This commit is contained in:
alzeih
2010-03-18 21:41:23 +13:00
parent 8e5a5552c4
commit b7087136cb
7 changed files with 68 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -32,13 +32,13 @@ namespace OpenRA.Traits
class NukePower : SupportPower, IResolveOrder
{
public NukePower(Actor self, NukePowerInfo info) : base(self, info) { }
protected override void OnBeginCharging() { Sound.PlayToPlayer(Owner, "aprep1.aud"); }
protected override void OnFinishCharging() { Sound.PlayToPlayer(Owner, "aready1.aud"); }
protected override void OnBeginCharging() { Sound.PlayToPlayer(Owner, Info.BeginChargeSound); }
protected override void OnFinishCharging() { Sound.PlayToPlayer(Owner, Info.EndChargeSound); }
protected override void OnActivate()
{
Game.controller.orderGenerator = new SelectTarget();
Sound.Play("slcttgt1.aud");
Sound.Play(Info.SelectTargetSound);
}
public void ResolveOrder(Actor self, Order order)
@@ -55,7 +55,7 @@ namespace OpenRA.Traits
{
// Play to everyone but the current player
if (Owner != Owner.World.LocalPlayer)
Sound.Play("alaunch1.aud");
Sound.Play(Info.LaunchSound);
//FIRE ZE MISSILES
w.Add(new NukeLaunch(silo, Info.MissileWeapon, order.TargetLocation));

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -34,6 +34,12 @@ namespace OpenRA.Traits
public readonly int TechLevel = -1;
public readonly bool GivenAuto = true;
public readonly string MissileWeapon = "";
public readonly string BeginChargeSound = null;
public readonly string EndChargeSound = null;
public readonly string SelectTargetSound = null;
public readonly string LaunchSound = null;
public abstract object Create(Actor self);
}