aboutsummaryrefslogtreecommitdiff
path: root/Mundus/Data/SuperLayers/Underground.cs
blob: 1d98c2d42304ca625b2841763baebdc214602392 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using Mundus.Service.Tiles;
using Mundus.Service.Tiles.Items;

namespace Mundus.Data.SuperLayers {
    public class Underground : ISuperLayer {
        private static MobTile[,] mobLayer;
        private static Structure[,] structureLayer;
        private static GroundTile[,] groundLayer;

        public Underground() 
        { }

        public MobTile GetMobLayerTile(int yPos, int xPos) {
            return mobLayer[yPos, xPos];
        }
        public Structure GetStructureLayerTile(int yPos, int xPos) {
            return structureLayer[yPos, xPos];
        }
        public GroundTile GetGroundLayerTile(int yPos, int xPos) {
            return groundLayer[yPos, xPos];
        }

        public void SetMobLayer(MobTile[,] mobTiles) {
            mobLayer = mobTiles;
        }
        public void SetMobAtPosition(MobTile tile, int yPos, int xPos) {
            mobLayer[yPos, xPos] = tile;
        }
        public void RemoveMobFromPosition(int yPos, int xPos) {
            mobLayer[yPos, xPos] = null;
        }

        public void SetStructureLayer(Structure[,] itemTiles) {
            structureLayer = itemTiles;
        }
        public void SetStructureAtPosition(Structure tile, int yPos, int xPos) {
            structureLayer[yPos, xPos] = tile;
        }
        public void RemoveStructureFromPosition(int yPos, int xPos) {
            structureLayer[yPos, xPos] = null;
        }

        public void SetGroundLayer(GroundTile[,] groundTiles) {
            groundLayer = groundTiles;
        }
        public void SetGroundAtPosition(GroundTile tile, int yPos, int xPos) {
            groundLayer[yPos, xPos] = tile;
        }
        public void RemoveGroundFromPosition(int yPos, int xPos) {
            groundLayer[yPos, xPos] = null;
        }
    }
}