public void FinalizeBridges(World world) { // go looking for our neighbors, if this is a long bridge. var info = self.Info.Traits.Get<BridgeInfo>(); if (info.NorthOffset != null) northNeighbour = GetNeighbor(world, info.NorthOffset); if (info.SouthOffset != null) southNeighbour = GetNeighbor(world, info.SouthOffset); }
public BridgeHut(ActorInitializer init) { bridge = init.Get<ParentActorInit>().value.Trait<Bridge>(); }
public BridgeHut(ActorInitializer init) { Bridge = init.Get<ParentActorInit>().value.Trait<Bridge>(); Bridge.Hut = this; firstBridge = new Lazy<Bridge>(() => Bridge.Enumerate(0, true).Last()); }
public BridgeHut(ActorInitializer init) { Bridge = init.Get<ParentActorInit>().ActorValue.Trait<Bridge>(); Bridge.AddHut(this); FirstBridge = Bridge.Enumerate(0, true).Last(); }
static bool IsLong(Bridge b) { return b != null && b.self.IsInWorld && b.self.Info.Traits.Get<BridgeInfo>().Long; }
static bool IsIntact(Bridge b) { return b != null && b.self.IsInWorld && b.self.Health > 0; }