Monsters turn in direction walking
This commit is contained in:
@@ -104,9 +104,15 @@ namespace DepthsBelow
|
||||
sceneRenderTarget = new RenderTarget2D(GraphicsDevice, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);
|
||||
|
||||
Map = Content.Load<Map>("maps/Aztek.Test");
|
||||
//Map = Content.Load<Map>("maps/Cave.Level1");
|
||||
// Load map objects
|
||||
Map.ParseObjects(this);
|
||||
GroupManager = new DynamicGroupManager(Squad.Cast<Entity>().ToList(), (float)Grid.TileSize * 1.5f);
|
||||
Squad[0].Name = "Dean H. Jones";
|
||||
Squad[1].Name = "Walter L. Verville";
|
||||
Squad[2].Name = "Patrick Y. Southerland";
|
||||
Squad[3].Name = "Andrew C. Friend";
|
||||
Squad[4].Name = "Gary B. Whitley";
|
||||
Interface.CreateUnitFrames(Squad);
|
||||
|
||||
// TODO: use this.Content to load your game content here
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace DepthsBelow
|
||||
|
||||
var nameText = new GUI.Text(frame);
|
||||
nameText.SetFont("fonts/UnitName");
|
||||
nameText.Value = soldier.Name + " " + soldier.GetHashCode();
|
||||
nameText.Value = soldier.Name + " "/* + soldier.GetHashCode()*/;
|
||||
nameText.X = 4;
|
||||
nameText.Y = 1;
|
||||
frame["nameText"] = nameText;
|
||||
|
||||
@@ -177,6 +177,10 @@ namespace DepthsBelow
|
||||
}*/
|
||||
core.TestMonster.X = 12;
|
||||
core.TestMonster.Y = 4;
|
||||
}
|
||||
if (ks.IsKeyDown(Keys.N))
|
||||
{
|
||||
|
||||
}
|
||||
if (ks.IsKeyDown(Keys.S))
|
||||
{
|
||||
|
||||
@@ -111,14 +111,25 @@ namespace DepthsBelow
|
||||
// HACK: Make this work properly with other speeds...
|
||||
float speed = 4f;
|
||||
if (Transform.World.X < nodeWorldPos.X)
|
||||
{
|
||||
Transform.World.X += speed;
|
||||
GetComponent<Component.Transform>().World.Rotation = MathHelper.ToRadians(0);
|
||||
}
|
||||
if (Transform.World.X > nodeWorldPos.X)
|
||||
{
|
||||
Transform.World.X -= speed;
|
||||
GetComponent<Component.Transform>().World.Rotation = MathHelper.ToRadians(180);
|
||||
}
|
||||
if (Transform.World.Y < nodeWorldPos.Y)
|
||||
{
|
||||
Transform.World.Y += speed;
|
||||
GetComponent<Component.Transform>().World.Rotation = MathHelper.ToRadians(90);
|
||||
}
|
||||
if (Transform.World.Y > nodeWorldPos.Y)
|
||||
{
|
||||
Transform.World.Y -= speed;
|
||||
|
||||
GetComponent<Component.Transform>().World.Rotation = MathHelper.ToRadians(270);
|
||||
}
|
||||
if (Transform.World == nodeWorldPos)
|
||||
{
|
||||
if (currentStep < numberOfSteps)
|
||||
|
||||
Reference in New Issue
Block a user