add a Lua controllable flash palette trait

This commit is contained in:
Matthias Mailänder
2015-04-05 18:15:45 +02:00
parent a0c3a3adaa
commit ed7b54a21e
12 changed files with 141 additions and 66 deletions

View File

@@ -45,6 +45,8 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Amount of time after detonation to remove the camera")]
public readonly int CameraRemoveDelay = 25;
public readonly string FlashType = null;
public override object Create(ActorInitializer init) { return new NukePower(init.Self, this); }
}
@@ -76,7 +78,8 @@ namespace OpenRA.Mods.Common.Traits
var missile = new NukeLaunch(self.Owner, info.MissileWeapon,
self.CenterPosition + body.LocalToWorld(info.SpawnOffset),
targetPosition,
info.FlightVelocity, info.FlightDelay, info.SkipAscent);
info.FlightVelocity, info.FlightDelay, info.SkipAscent,
info.FlashType);
self.World.AddFrameEndTask(w => w.Add(missile));