diff options
Diffstat (limited to 'Mundus/Service/SuperLayers/HeightController.cs')
| -rw-r--r-- | Mundus/Service/SuperLayers/HeightController.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Mundus/Service/SuperLayers/HeightController.cs b/Mundus/Service/SuperLayers/HeightController.cs new file mode 100644 index 0000000..9d216f5 --- /dev/null +++ b/Mundus/Service/SuperLayers/HeightController.cs @@ -0,0 +1,39 @@ +using System; +using Mundus.Data.SuperLayers; +using Mundus.Service.Mobs; + +namespace Mundus.Service.SuperLayers { + public static class HeightController { + private static ISuperLayer sky = LI.Sky; + private static ISuperLayer land = LI.Land; + private static ISuperLayer underground = LI.Underground; + + public static ISuperLayer GetLayerUnderneath(ISuperLayer currentLayer) { + if (land == currentLayer) { + return underground; + } + if (sky == currentLayer) { + return land; + } + return null; + } + + public static ISuperLayer GetLayerUnderneathMob(IMob currentMob) { + return GetLayerUnderneath(currentMob.CurrSuperLayer); + } + + public static ISuperLayer GetLayerAbove(ISuperLayer currentLayer) { + if (underground == currentLayer) { + return land; + } + if (land == currentLayer) { + return sky; + } + return null; + } + + public static ISuperLayer GetLayerAboveMob(IMob currentMob) { + return GetLayerAbove(currentMob.CurrSuperLayer); + } + } +} |
