Frickin' Lasers
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using IjwFramework.Types;
|
||||
using OpenRa.Effects;
|
||||
using System.Drawing;
|
||||
|
||||
namespace OpenRa.Traits
|
||||
{
|
||||
@@ -148,7 +149,13 @@ namespace OpenRa.Traits
|
||||
{
|
||||
var srcAltitude = unit != null ? unit.Altitude : 0;
|
||||
var destAltitude = destUnit != null ? destUnit.Altitude : 0;
|
||||
|
||||
|
||||
if ( weapon.RenderAsLaser )
|
||||
{
|
||||
// TODO: This is a hack; should probably use a particular palette index
|
||||
Color bc = (weapon.UsePlayerColor) ? Player.PlayerColors[self.Owner.PaletteIndex].c : Color.Red;
|
||||
self.World.Add(new LaserZap(firePos, thisTarget.CenterLocation.ToInt2(), weapon.BeamRadius, bc));
|
||||
}
|
||||
if( weapon.RenderAsTesla )
|
||||
self.World.Add( new TeslaZap( firePos, thisTarget.CenterLocation.ToInt2() ) );
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ namespace OpenRa.Traits
|
||||
{
|
||||
class RenderBuildingChargeInfo : RenderBuildingInfo
|
||||
{
|
||||
public readonly string ChargeAudio = "tslachg2.aud";
|
||||
public override object Create(Actor self) { return new RenderBuildingCharge(self); }
|
||||
}
|
||||
|
||||
@@ -16,7 +17,7 @@ namespace OpenRa.Traits
|
||||
|
||||
public void Attacking(Actor self)
|
||||
{
|
||||
Sound.Play("tslachg2.aud");
|
||||
Sound.Play(self.Info.Traits.Get<RenderBuildingChargeInfo>().ChargeAudio);
|
||||
anim.PlayThen(GetPrefix(self) + "active",
|
||||
() => anim.PlayRepeating(GetPrefix(self) + "idle"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user