Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public BridgeHut(ActorInitializer init)
 {
     bridge = init.Get<ParentActorInit>().value.Trait<Bridge>();
 }
Esempio n. 3
0
 public BridgeHut(ActorInitializer init)
 {
     Bridge = init.Get<ParentActorInit>().value.Trait<Bridge>();
     Bridge.Hut = this;
     firstBridge = new Lazy<Bridge>(() => Bridge.Enumerate(0, true).Last());
 }
Esempio n. 4
0
 public BridgeHut(ActorInitializer init)
 {
     Bridge = init.Get<ParentActorInit>().ActorValue.Trait<Bridge>();
     Bridge.AddHut(this);
     FirstBridge = Bridge.Enumerate(0, true).Last();
 }
Esempio n. 5
0
 static bool IsLong(Bridge b)
 {
     return b != null && b.self.IsInWorld && b.self.Info.Traits.Get<BridgeInfo>().Long;
 }
Esempio n. 6
0
 static bool IsIntact(Bridge b)
 {
     return b != null && b.self.IsInWorld && b.self.Health > 0;
 }