Beispiel #1
0
        public void Instantiate(Object[,,] objects, GameObject parent, TerrainType[,] generatedMapInfo)
        {
            for (int zi = 0; zi < generatedMapInfo.GetLength(0); zi++)
            {
                for (int xi = 0; xi < generatedMapInfo.GetLength(1); xi++)
                {
                    switch (generatedMapInfo[zi, xi])
                    {
                    case TerrainType.InsideWall:
                    case TerrainType.Wall:
                        Utils.Position position = new Utils.Position()
                        {
                            coordinate = new Utils.Coordinate()
                            {
                                x = xi, z = zi
                            }, layer = Utils.Layer.Character
                        };
                        objects[xi, zi, (int)Utils.Layer.Character] = new NormalWall(position);
                        break;

                    case TerrainType.Way:
                        break;

                    case TerrainType.Room:
                        break;

                    default:
                        break;
                    }
                }
            }
        }
Beispiel #2
0
 public Item(Utils.Position position) : base(position)
 {
 }
Beispiel #3
0
 public Character(Utils.Position position) : base(position)
 {
 }
Beispiel #4
0
 public Enemy(Utils.Position position) : base(position)
 {
 }
Beispiel #5
0
 protected MapObject(Utils.Position position) : base(position)
 {
 }
Beispiel #6
0
 public Player(Utils.Position position) : base(position)
 {
 }