tib tree animations
This commit is contained in:
@@ -30,6 +30,7 @@ namespace OpenRA.Mods.RA
|
||||
public readonly int Interval = 75;
|
||||
public readonly string ResourceType = "Ore";
|
||||
public readonly int MaxRange = 100;
|
||||
public readonly int AnimationInterval = 750;
|
||||
|
||||
public object Create(Actor self) { return new SeedsResource(); }
|
||||
}
|
||||
@@ -37,6 +38,7 @@ namespace OpenRA.Mods.RA
|
||||
class SeedsResource : ITick
|
||||
{
|
||||
int ticks;
|
||||
int animationTicks;
|
||||
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
@@ -64,6 +66,13 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
ticks = info.Interval;
|
||||
}
|
||||
|
||||
if (--animationTicks <= 0)
|
||||
{
|
||||
var info = self.Info.Traits.Get<SeedsResourceInfo>();
|
||||
self.traits.Get<RenderBuilding>().PlayCustomAnim(self, "active");
|
||||
animationTicks = info.AnimationInterval;
|
||||
}
|
||||
}
|
||||
|
||||
static IEnumerable<int2> RandomWalk(int2 p, Thirdparty.Random r)
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
<sequences>
|
||||
<!-- Blossom Trees -->
|
||||
<unit name="split2">
|
||||
<sequence name="make" start="0" length="54" />
|
||||
<sequence name="make" start="0" length="30" />
|
||||
<sequence name="active" start="30" length="24" />
|
||||
<sequence name="idle" start="54" length="1" />
|
||||
</unit>
|
||||
<unit name="split3">
|
||||
<sequence name="make" start="0" length="54" />
|
||||
<sequence name="make" start="0" length="30" />
|
||||
<sequence name="active" start="30" length="24" />
|
||||
<sequence name="idle" start="54" length="1" />
|
||||
</unit>
|
||||
|
||||
|
||||
@@ -608,6 +608,7 @@
|
||||
</unit>
|
||||
<unit name="mine">
|
||||
<sequence name="idle" start="0" length="1" />
|
||||
<sequence name="active" start="0" length="1" />
|
||||
</unit>
|
||||
<unit name="dragon">
|
||||
<sequence name="idle" start="0" facings="32" />
|
||||
|
||||
Reference in New Issue
Block a user