destructible trees for both CnC and RA mod

- move DeadBuildingState to OpenRA.Mods.RA
- don't loop sequences with length > 1
This commit is contained in:
Matthias Mailänder
2013-03-10 10:08:59 +01:00
parent 19e6a588b8
commit 17d032b190
7 changed files with 246 additions and 93 deletions

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -76,7 +76,6 @@
<Compile Include="Activities\HarvesterDockSequence.cs" />
<Compile Include="CncLoadScreen.cs" />
<Compile Include="CncMenuPaletteEffect.cs" />
<Compile Include="DeadBuildingState.cs" />
<Compile Include="Effects\IonCannon.cs" />
<Compile Include="IonCannonPower.cs" />
<Compile Include="Missions\CncShellmapScript.cs" />

View File

@@ -35,7 +35,12 @@ namespace OpenRA.Mods.Cnc
public void Killed(Actor self, AttackInfo e)
{
if (!rs.anim.HasSequence("dead")) return;
if (rs.anim.GetSequence("dead").Length > 1)
rs.anim.Play("dead");
else
rs.anim.PlayRepeating("dead");
self.World.AddFrameEndTask(
w => w.Add(
new DelayedAction(info.LingerTime,

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -155,6 +155,7 @@
<Compile Include="Buildings\CanPowerDown.cs" />
<Compile Include="Buildings\CustomSellValue.cs" />
<Compile Include="Buildings\CustomBuildTimeValue.cs" />
<Compile Include="Buildings\DeadBuildingState.cs" />
<Compile Include="Buildings\FootprintUtils.cs" />
<Compile Include="Buildings\LineBuild.cs" />
<Compile Include="Buildings\PowerManager.cs" />

View File

@@ -355,6 +355,14 @@
Terrain: Tree
EditorAppearance:
RelativeToTopLeft: yes
Health:
HP: 500
DeadBuildingState:
Armor:
Type: Wood
TargetableBuilding:
TargetTypes: Ground
AutoTargetIgnore:
^Rock:
Tooltip:

View File

@@ -49,163 +49,232 @@ rock7:
tc04:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
tc05:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
tc03:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
tc02:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
tc01:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t18:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t17:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t16:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t15:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t14:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t13:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t12:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t11:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t10:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t09:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t08:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t07:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t06:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t05:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t04:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t03:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t02:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t01:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
v01:
idle:

View File

@@ -329,6 +329,14 @@
UseTerrainPalette: true
ProximityCaptor:
Types:Tree
Health:
HP: 500
DeadBuildingState:
Armor:
Type: Wood
TargetableBuilding:
TargetTypes: Ground
AutoTargetIgnore:
^Husk:
Husk:

View File

@@ -1131,128 +1131,182 @@ smoke_m:
tc04:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
tc05:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
tc03:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
tc02:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
tc01:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t17:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t16:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t15:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t14:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t13:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t12:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t11:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t10:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t08:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t07:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t06:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t05:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t03:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
ice01:
idle:
@@ -1282,16 +1336,22 @@ ice05:
t02:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
t01:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
mine:
idle:
@@ -2605,9 +2665,12 @@ rock7:
t04:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80
v20:
idle: