add smoke trails for damaged aircraft
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
<Compile Include="Activities\Demolish.cs" />
|
||||
<Compile Include="Activities\Enter.cs" />
|
||||
<Compile Include="Activities\EnterTransport.cs" />
|
||||
<Compile Include="SmokeTrailWhenDamaged.cs" />
|
||||
<Compile Include="Strategic\StrategicVictoryConditions.cs" />
|
||||
<Compile Include="Strategic\StrategicPoint.cs" />
|
||||
<Compile Include="ProximityCapturable.cs" />
|
||||
|
||||
31
OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs
Normal file
31
OpenRA.Mods.RA/SmokeTrailWhenDamaged.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Mods.RA.Effects;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class SmokeTrailWhenDamagedInfo : TraitInfo<SmokeTrailWhenDamaged> { }
|
||||
|
||||
class SmokeTrailWhenDamaged : ITick
|
||||
{
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
if (self.GetDamageState() >= DamageState.Heavy)
|
||||
self.World.AddFrameEndTask(
|
||||
w => { if (!self.Destroyed) w.Add(
|
||||
new Smoke(w, self.CenterLocation.ToInt2()
|
||||
- new int2(0, self.Trait<IMove>().Altitude),
|
||||
"smokey")); });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user