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)
|
||||
|
||||
Reference in New Issue
Block a user