fixed the roof of the WEAP. we'll still need to do the z-order for it.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<Class Name="OpenRa.Game.World">
|
||||
<Position X="8.75" Y="4.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAaAACBBAAAAAiAAAIACBgAAAAAAAAAIAAAAAAgAAAA=</HashCode>
|
||||
<HashCode>AAYAACABAAAAgAAAAIAABgAAAAAAAAAIAAAAAAAAAAA=</HashCode>
|
||||
<FileName>World.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
@@ -21,10 +21,10 @@
|
||||
<FileName>Building.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="OpenRa.Game.Game" Collapsed="true">
|
||||
<Class Name="OpenRa.Game.Game">
|
||||
<Position X="11" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAEAEAAAAIAAAgAABAAAIAAQAAAAAQAAJAAAAABAQAA=</HashCode>
|
||||
<HashCode>AAAAEAAAAIAAAAEEBAAAIAAQQAAAAQAAJAAAAABAQAA=</HashCode>
|
||||
<FileName>Game.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
@@ -63,8 +63,8 @@
|
||||
<FileName>PathFinder.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="OpenRa.Game.Player" Collapsed="true">
|
||||
<Position X="11" Y="1.5" Width="1.5" />
|
||||
<Class Name="OpenRa.Game.Player">
|
||||
<Position X="12.75" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAEAAAAAAAAAAAAAAAAAACAAAgAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Player.cs</FileName>
|
||||
@@ -114,7 +114,7 @@
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="OpenRa.Game.TerrainCosts" Collapsed="true">
|
||||
<Position X="11" Y="2.5" Width="1.5" />
|
||||
<Position X="14.5" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAIAAAAAABAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>TerrainCosts.cs</FileName>
|
||||
@@ -174,14 +174,14 @@
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Struct Name="OpenRa.Game.CellInfo" Collapsed="true">
|
||||
<Position X="11" Y="4.75" Width="1.5" />
|
||||
<Position X="14.5" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAIAAAEAAAAAAAAAAAQAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>PathFinder.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Struct>
|
||||
<Struct Name="OpenRa.Game.PathDistance" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="12.75" Y="4.75" Width="1.5" />
|
||||
<Position X="12.75" Y="8" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAQAAAIAQAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>PathFinder.cs</FileName>
|
||||
|
||||
@@ -49,8 +49,9 @@ namespace OpenRa.Game
|
||||
network = new Network();
|
||||
|
||||
buildingCreation.Add("proc", (location, owner) => new Refinery(location, owner, this));
|
||||
buildingCreation.Add("weap", (location, owner) => new WarFactory(location, owner, this));
|
||||
|
||||
string[] buildings = { "fact", "powr", "apwr", "weap", "barr", "atek", "stek", "dome" };
|
||||
string[] buildings = { "fact", "powr", "apwr", "barr", "atek", "stek", "dome" };
|
||||
foreach (string s in buildings)
|
||||
{
|
||||
var t = s;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using OpenRa.Game.Graphics;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenRa.Game
|
||||
{
|
||||
@@ -20,4 +22,37 @@ namespace OpenRa.Game
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class WarFactory : Building
|
||||
{
|
||||
Animation roof;
|
||||
|
||||
public WarFactory(int2 location, Player owner, Game game)
|
||||
: base("weap", location, owner, game)
|
||||
{
|
||||
|
||||
animation.PlayThen("make", () =>
|
||||
{
|
||||
roof = new Animation("weap");
|
||||
animation.PlayRepeating("idle");
|
||||
roof.PlayRepeating("idle-top");
|
||||
});
|
||||
}
|
||||
|
||||
public override Sprite[] CurrentImages
|
||||
{
|
||||
get
|
||||
{
|
||||
return (roof == null)
|
||||
? base.CurrentImages
|
||||
: (base.CurrentImages.Concat( roof.Images ).ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
public override void Tick(Game game, int t)
|
||||
{
|
||||
base.Tick(game, t);
|
||||
if (roof != null) roof.Tick(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,10 @@
|
||||
<sequence name="idle" start="0"/>
|
||||
<sequence name="damaged-idle" start="1"/>
|
||||
<sequence name="make" start="0" length="*" src="weapmake" />
|
||||
<sequence name="build-top" start="0" length="4" src="weap2" />
|
||||
<sequence name="build2-top" start="4" length="4" src="weap2" />
|
||||
<sequence name="idle-top" start="0" length="1" src="weap2" />
|
||||
<sequence name="damaged-idle_top" start="4" length="1" src="weap2" />
|
||||
</unit>
|
||||
|
||||
<!-- mcv -->
|
||||
|
||||
Reference in New Issue
Block a user