Improved map rendering, shops, light bugfix, junction boxes wont break as easily

This commit is contained in:
Regalis
2015-07-27 23:45:20 +03:00
parent 4238301ad3
commit 7155f1cef0
37 changed files with 472 additions and 300 deletions

View File

@@ -10,7 +10,7 @@ using System.Collections.ObjectModel;
namespace Subsurface
{
public enum SpawnType { None, Human, Enemy };
public enum SpawnType { None, Human, Enemy, Cargo };
class WayPoint : MapEntity
{
public static List<WayPoint> WayPointList = new List<WayPoint>();
@@ -52,6 +52,7 @@ namespace Subsurface
WayPointList.Add(this);
}
public override void Draw(SpriteBatch spriteBatch, bool editing)
{
if (!editing && !Game1.DebugDraw) return;
@@ -59,7 +60,7 @@ namespace Subsurface
Point pos = new Point((int)Position.X, (int)Position.Y);
Color clr = (isSelected) ? Color.Red : Color.LightGreen;
GUI.DrawRectangle(spriteBatch, new Rectangle(pos.X, -pos.Y, rect.Width, rect.Height), clr, true);
GUI.DrawRectangle(spriteBatch, new Rectangle(pos.X - rect.Width / 2, -pos.Y - rect.Height / 2, rect.Width, rect.Height), clr, true);
foreach (MapEntity e in linkedTo)
{
@@ -102,7 +103,7 @@ namespace Subsurface
spawnType += (int)button.UserData;
if (spawnType > SpawnType.Enemy) spawnType = SpawnType.None;
if (spawnType > SpawnType.Cargo) spawnType = SpawnType.None;
if (spawnType < SpawnType.None) spawnType = SpawnType.Enemy;
spawnTypeText.Text = spawnType.ToString();