Add `roof' to lst
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -63,6 +63,7 @@
|
||||
<Compile Include="RenderGunboat.cs" />
|
||||
<Compile Include="RenderCargo.cs" />
|
||||
<Compile Include="CncLoadScreen.cs" />
|
||||
<Compile Include="WithRoof.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
|
||||
33
OpenRA.Mods.Cnc/WithRoof.cs
Normal file
33
OpenRA.Mods.Cnc/WithRoof.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
#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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Graphics;
|
||||
|
||||
namespace OpenRA.Mods.Cnc
|
||||
{
|
||||
class WithRoofInfo : ITraitInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new WithRoof(init.self); }
|
||||
}
|
||||
|
||||
class WithRoof
|
||||
{
|
||||
public WithRoof(Actor self)
|
||||
{
|
||||
var rs = self.Trait<RenderSimple>();
|
||||
var roof = new Animation(rs.GetImage(self), () => self.Trait<IFacing>().Facing);
|
||||
roof.Play("roof");
|
||||
rs.anims.Add( "roof", new RenderSimple.AnimationWithOffset( roof ) { ZOffset = 24 } );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -645,7 +645,7 @@ LST:
|
||||
RevealsShroud:
|
||||
Range: 7
|
||||
RenderUnit:
|
||||
BelowUnits:
|
||||
WithRoof:
|
||||
RenderCargo:
|
||||
# -Selectable:
|
||||
Cargo:
|
||||
|
||||
Reference in New Issue
Block a user