Functional level generation + moving the submarine

This commit is contained in:
Regalis
2015-06-26 23:05:51 +03:00
parent bda9b31cbe
commit 9237a9efe2
48 changed files with 1629 additions and 750 deletions

View File

@@ -7,7 +7,13 @@ using Microsoft.Xna.Framework.Input;
namespace Subsurface
{
[Flags]
public enum Alignment { CenterX = 1, Left = 2, Right = 4, CenterY = 8, Top = 16, Bottom = 32 }
public enum Alignment
{
CenterX = 1, Left = 2, Right = 4, CenterY = 8, Top = 16, Bottom = 32 ,
TopRight = (Top | Right), TopLeft = (Top | Left), TopCenter = (CenterX | Top),
Center = (CenterX | CenterY),
BottomRight = (Bottom | Right), BottomLeft = (Bottom | Left), BottomCenter = (CenterX | Bottom)
}
class GUIMessage
@@ -258,15 +264,15 @@ namespace Subsurface
public static void Draw(float deltaTime, SpriteBatch spriteBatch, Camera cam)
{
//spriteBatch.DrawString(font,
// "FPS: " + (int)Game1.frameCounter.AverageFramesPerSecond
// + " - render: "+Game1.renderTimeElapsed,
// new Vector2(10, 10), Color.White);
spriteBatch.DrawString(font,
"FPS: " + (int)Game1.frameCounter.AverageFramesPerSecond
+ " - render: " + Game1.renderTimeElapsed,
new Vector2(10, 10), Color.White);
//spriteBatch.DrawString(font,
// "Physics: " + Game1.world.UpdateTime
// + " - bodies: " + Game1.world.BodyList.Count,
// new Vector2(10, 30), Color.White);
spriteBatch.DrawString(font,
"Physics: " + Game1.world.UpdateTime
+ " - bodies: " + Game1.world.BodyList.Count,
new Vector2(10, 30), Color.White);
if (Character.Controlled != null && cam!=null) Character.Controlled.DrawHud(spriteBatch, cam);