Functional level generation + moving the submarine
This commit is contained in:
37
Subsurface/Map/Location.cs
Normal file
37
Subsurface/Map/Location.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Subsurface
|
||||
{
|
||||
class Location
|
||||
{
|
||||
string name;
|
||||
|
||||
Vector2 mapPosition;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
}
|
||||
|
||||
public Vector2 MapPosition
|
||||
{
|
||||
get { return mapPosition; }
|
||||
}
|
||||
|
||||
public Location(string name, Vector2 mapPosition)
|
||||
{
|
||||
this.name = name;
|
||||
|
||||
this.mapPosition = mapPosition;
|
||||
}
|
||||
|
||||
public static Location CreateRandom(Vector2 position)
|
||||
{
|
||||
return new Location("Location " + (Game1.random.Next() % 10000), position);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user