Example #1
0
 public static void OnRampUpdate(Game.Ramp self, float dt)
 {
     throw new Exception("We did it :)");
     if (!CanGrow(self))
     {
         //guess we do not have animations, so guess we don't need it & are safe to remove it ...
         //GnomanEmpire.Instance.EntityManager.RemoveFromUpdateList(self);
     }
     else if (GnomanEmpire.Instance.Region.Season() != Season.Winter)
     {
         //map.TerrainProperties[base.MaterialID].
     }
 }
Example #2
0
        private static bool CanGrow(Game.Ramp self)
        {
            if (!self.Cell().Outside)
            {
                return(false);
            }
            var map   = GnomanEmpire.Instance.Map;
            var cells = new MapCell[4];

            return
                (CanGrow_CheckBorderingCell(map.GetCell((int)self.Position.Z, (int)self.Position.X + 1, (int)self.Position.Y))

                 /*
                 || CanGrow_CheckBorderingCell(map.GetCell((int)self.Position.Z, (int)self.Position.X - 1, (int)self.Position.Y))
                 || CanGrow_CheckBorderingCell(map.GetCell((int)self.Position.Z, (int)self.Position.X, (int)self.Position.Y + 1))
                 || CanGrow_CheckBorderingCell(map.GetCell((int)self.Position.Z, (int)self.Position.X, (int)self.Position.Y - 1))
                 || CanGrow_CheckBorderingCell(map.GetCell((int)self.Position.Z, (int)self.Position.X + 1, (int)self.Position.Y))
                 */
                 || CanGrow_CheckBorderingCell(map.GetCell((int)self.Position.Z, (int)self.Position.X - 1, (int)self.Position.Y)) ||
                 CanGrow_CheckBorderingCell(map.GetCell((int)self.Position.Z, (int)self.Position.X, (int)self.Position.Y + 1)) ||
                 CanGrow_CheckBorderingCell(map.GetCell((int)self.Position.Z, (int)self.Position.X, (int)self.Position.Y - 1)));
        }