Merge branch 'master' of github.com:sippeangelo/DepthsBelow
Conflicts: DepthsBelow/DepthsBelow/KeyboardInput.cs DepthsBelow/DepthsBelow/SmallEnemy.cs
This commit is contained in:
@@ -32,7 +32,7 @@ namespace DepthsBelow
|
||||
public Camera Camera;
|
||||
public Interface Interface;
|
||||
|
||||
public static MouseInput MouseInput;
|
||||
public/* static*/ MouseInput MouseInput;
|
||||
public static KeyboardInput KeyboardInput;
|
||||
public List<Soldier> Squad;
|
||||
public DynamicGroupManager GroupManager;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,327 +1,328 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
|
||||
namespace DepthsBelow
|
||||
{
|
||||
public class KeyboardInput
|
||||
{
|
||||
Core core;
|
||||
private KeyboardState lastKeyboardState;
|
||||
|
||||
int checkerSpeed = 2;
|
||||
|
||||
int bulletCost = 5;
|
||||
int rocketCost = 10;
|
||||
|
||||
public KeyboardInput(Core core)
|
||||
{
|
||||
this.core = core;
|
||||
}
|
||||
|
||||
/*public List<List<Soldier>> GetGroups(List<Soldier> soldiers)
|
||||
{
|
||||
var ungrouped = soldiers.ToList();
|
||||
var groups = new List<List<Soldier>>();
|
||||
|
||||
for (int index = 0; index < soldiers.Count; index++)
|
||||
{
|
||||
var checkingSoldier = soldiers[index];
|
||||
var group = new List<Soldier>();
|
||||
|
||||
for (int i = 0; i < soldiers.Count; i++)
|
||||
{
|
||||
var soldier = soldiers[i];
|
||||
if (ungrouped.Contains(soldier))
|
||||
{
|
||||
float distance = Vector2.Distance(checkingSoldier.Transform.World + checkingSoldier.Transform.World.Origin,
|
||||
soldier.Transform.World + soldier.Transform.World.Origin);
|
||||
if (distance <= ((float) Grid.TileSize * 1f))
|
||||
{
|
||||
ungrouped.Remove(soldier);
|
||||
group.Add(soldier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (group.Count > 0)
|
||||
groups.Add(group);
|
||||
}
|
||||
|
||||
return groups;
|
||||
}*/
|
||||
|
||||
// Get a list of dynamic soldier groups
|
||||
public List<List<Soldier>> GetGroups(List<Soldier> soldiers, float maxRange)
|
||||
{
|
||||
var alreadyGrouped = new List<Soldier>();
|
||||
var groups = new List<List<Soldier>>();
|
||||
|
||||
for (int index = 0; index < soldiers.Count; index++)
|
||||
{
|
||||
var soldier = soldiers[index];
|
||||
|
||||
if (!alreadyGrouped.Contains(soldier))
|
||||
{
|
||||
var group = new List<Soldier>();
|
||||
GetNearChain(ref group, soldiers, soldier, maxRange);
|
||||
alreadyGrouped.AddRange(group);
|
||||
|
||||
if (group.Count > 0)
|
||||
groups.Add(group);
|
||||
}
|
||||
}
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
// Get all soldiers who are close to each other in a chain
|
||||
public void GetNearChain(ref List<Soldier> group, List<Soldier> soldiers, Soldier soldier, float maxRange)
|
||||
{
|
||||
for (int index = 0; index < soldiers.Count; index++)
|
||||
{
|
||||
var nearSoldier = soldiers[index];
|
||||
|
||||
if (!group.Contains(nearSoldier))
|
||||
{
|
||||
float distance = Vector2.Distance(nearSoldier.Transform.World + nearSoldier.Transform.World.Origin,
|
||||
soldier.Transform.World + soldier.Transform.World.Origin);
|
||||
if (distance <= maxRange)
|
||||
{
|
||||
group.Add(nearSoldier);
|
||||
GetNearChain(ref group, soldiers, nearSoldier, maxRange);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private DynamicGroupManager groupManager;
|
||||
|
||||
public void Update(GameTime gameTime)
|
||||
{
|
||||
KeyboardState ks = Keyboard.GetState();
|
||||
|
||||
// Brightness
|
||||
if (ks.IsKeyUp(Keys.Up) && lastKeyboardState.IsKeyDown(Keys.Up))
|
||||
core.Brightness = (int)MathHelper.Clamp(core.Brightness + 5, 0, 254);
|
||||
if (ks.IsKeyUp(Keys.Down) && lastKeyboardState.IsKeyDown(Keys.Down))
|
||||
core.Brightness = (int)MathHelper.Clamp(core.Brightness - 5, 0, 254);
|
||||
|
||||
// Debug test: grouping
|
||||
if (ks.IsKeyUp(Keys.K) && lastKeyboardState.IsKeyDown(Keys.K))
|
||||
{
|
||||
if (groupManager == null)
|
||||
groupManager = new DynamicGroupManager(core.Squad.Cast<Entity>().ToList(), Grid.TileSize * 1.5f);
|
||||
groupManager.UpdateGroups();
|
||||
//var groups = GetGroups(core.Squad, (float)Grid.TileSize * 1.5f);
|
||||
var groups = groupManager.Groups;
|
||||
foreach (var group in groups)
|
||||
{
|
||||
Debug.WriteLine("Group #" + groups.IndexOf(group) + " Panic: " + group.Panic);
|
||||
foreach (var entity in group.Entities)
|
||||
{
|
||||
var soldier = (Soldier)entity;
|
||||
Debug.WriteLine(soldier.Name + " " + soldier.GetHashCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Next turn
|
||||
if (ks.IsKeyDown(Keys.Enter) && lastKeyboardState.IsKeyUp(Keys.Enter))
|
||||
{
|
||||
if (core.TurnManager.CurrentTurn == core.TurnManager["Player"])
|
||||
{
|
||||
foreach (var unit in core.Squad)
|
||||
{
|
||||
unit.AP = unit.MaxActionPoints;
|
||||
unit.Fired = false;
|
||||
}
|
||||
|
||||
core.TurnManager.EndTurn();
|
||||
}
|
||||
|
||||
if (core.TurnManager.CurrentTurn == core.TurnManager["Computer"])
|
||||
{
|
||||
foreach (var enemy in core.Swarm)
|
||||
{
|
||||
enemy.step = 0;
|
||||
Point target = Point.Zero;
|
||||
float distance = 7000;
|
||||
foreach (var unit in core.Squad)
|
||||
{
|
||||
Vector2 soldier = new Vector2(unit.Transform.Grid.X, unit.Transform.Grid.Y);
|
||||
Vector2 monster = new Vector2(enemy.Transform.Grid.X, enemy.Transform.Grid.Y);
|
||||
|
||||
float newDistance = Vector2.Distance(soldier, monster);
|
||||
|
||||
if (newDistance < distance)
|
||||
{
|
||||
target = unit.Transform.Grid;
|
||||
distance = newDistance;
|
||||
}
|
||||
}
|
||||
enemy.GetComponent<Component.PathFinder>().Goal = target;
|
||||
distance = 7000;
|
||||
|
||||
}
|
||||
|
||||
core.TestMonster.step = 0;
|
||||
Point testTarget = Point.Zero;
|
||||
float testDistance = 7000;
|
||||
foreach (var unit in core.Squad)
|
||||
{
|
||||
Vector2 soldier = new Vector2(unit.Transform.Grid.X, unit.Transform.Grid.Y);
|
||||
Vector2 monster = new Vector2(core.TestMonster.Transform.Grid.X, core.TestMonster.Transform.Grid.Y);
|
||||
|
||||
float newDistance = Vector2.Distance(soldier, monster);
|
||||
|
||||
if (newDistance < testDistance)
|
||||
{
|
||||
testTarget = unit.Transform.Grid;
|
||||
testDistance = newDistance;
|
||||
}
|
||||
}
|
||||
core.TestMonster.GetComponent<Component.PathFinder>().Goal = testTarget;
|
||||
testDistance = 7000;
|
||||
|
||||
core.TurnManager.EndTurn();
|
||||
}
|
||||
}
|
||||
if (ks.IsKeyDown(Keys.A))
|
||||
{
|
||||
/*foreach (var unit in core.Swarm)
|
||||
{
|
||||
unit.X = 200;
|
||||
unit.Y = 200;
|
||||
}*/
|
||||
core.TestMonster.X = 12;
|
||||
core.TestMonster.Y = 4;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using Microsoft.Xna.Framework.Media;
|
||||
|
||||
namespace DepthsBelow
|
||||
{
|
||||
public class KeyboardInput
|
||||
{
|
||||
Core core;
|
||||
private KeyboardState lastKeyboardState;
|
||||
|
||||
int checkerSpeed = 2;
|
||||
|
||||
int bulletCost = 5;
|
||||
int rocketCost = 10;
|
||||
|
||||
public KeyboardInput(Core core)
|
||||
{
|
||||
this.core = core;
|
||||
}
|
||||
|
||||
/*public List<List<Soldier>> GetGroups(List<Soldier> soldiers)
|
||||
{
|
||||
var ungrouped = soldiers.ToList();
|
||||
var groups = new List<List<Soldier>>();
|
||||
|
||||
for (int index = 0; index < soldiers.Count; index++)
|
||||
{
|
||||
var checkingSoldier = soldiers[index];
|
||||
var group = new List<Soldier>();
|
||||
|
||||
for (int i = 0; i < soldiers.Count; i++)
|
||||
{
|
||||
var soldier = soldiers[i];
|
||||
if (ungrouped.Contains(soldier))
|
||||
{
|
||||
float distance = Vector2.Distance(checkingSoldier.Transform.World + checkingSoldier.Transform.World.Origin,
|
||||
soldier.Transform.World + soldier.Transform.World.Origin);
|
||||
if (distance <= ((float) Grid.TileSize * 1f))
|
||||
{
|
||||
ungrouped.Remove(soldier);
|
||||
group.Add(soldier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (group.Count > 0)
|
||||
groups.Add(group);
|
||||
}
|
||||
|
||||
return groups;
|
||||
}*/
|
||||
|
||||
// Get a list of dynamic soldier groups
|
||||
public List<List<Soldier>> GetGroups(List<Soldier> soldiers, float maxRange)
|
||||
{
|
||||
var alreadyGrouped = new List<Soldier>();
|
||||
var groups = new List<List<Soldier>>();
|
||||
|
||||
for (int index = 0; index < soldiers.Count; index++)
|
||||
{
|
||||
var soldier = soldiers[index];
|
||||
|
||||
if (!alreadyGrouped.Contains(soldier))
|
||||
{
|
||||
var group = new List<Soldier>();
|
||||
GetNearChain(ref group, soldiers, soldier, maxRange);
|
||||
alreadyGrouped.AddRange(group);
|
||||
|
||||
if (group.Count > 0)
|
||||
groups.Add(group);
|
||||
}
|
||||
}
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
// Get all soldiers who are close to each other in a chain
|
||||
public void GetNearChain(ref List<Soldier> group, List<Soldier> soldiers, Soldier soldier, float maxRange)
|
||||
{
|
||||
for (int index = 0; index < soldiers.Count; index++)
|
||||
{
|
||||
var nearSoldier = soldiers[index];
|
||||
|
||||
if (!group.Contains(nearSoldier))
|
||||
{
|
||||
float distance = Vector2.Distance(nearSoldier.Transform.World + nearSoldier.Transform.World.Origin,
|
||||
soldier.Transform.World + soldier.Transform.World.Origin);
|
||||
if (distance <= maxRange)
|
||||
{
|
||||
group.Add(nearSoldier);
|
||||
GetNearChain(ref group, soldiers, nearSoldier, maxRange);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private DynamicGroupManager groupManager;
|
||||
|
||||
public void Update(GameTime gameTime)
|
||||
{
|
||||
KeyboardState ks = Keyboard.GetState();
|
||||
|
||||
// Brightness
|
||||
if (ks.IsKeyUp(Keys.Up) && lastKeyboardState.IsKeyDown(Keys.Up))
|
||||
core.Brightness = (int)MathHelper.Clamp(core.Brightness + 5, 0, 254);
|
||||
if (ks.IsKeyUp(Keys.Down) && lastKeyboardState.IsKeyDown(Keys.Down))
|
||||
core.Brightness = (int)MathHelper.Clamp(core.Brightness - 5, 0, 254);
|
||||
|
||||
// Debug test: grouping
|
||||
if (ks.IsKeyUp(Keys.K) && lastKeyboardState.IsKeyDown(Keys.K))
|
||||
{
|
||||
if (groupManager == null)
|
||||
groupManager = new DynamicGroupManager(core.Squad.Cast<Entity>().ToList(), Grid.TileSize * 1.5f);
|
||||
groupManager.UpdateGroups();
|
||||
//var groups = GetGroups(core.Squad, (float)Grid.TileSize * 1.5f);
|
||||
var groups = groupManager.Groups;
|
||||
foreach (var group in groups)
|
||||
{
|
||||
Debug.WriteLine("Group #" + groups.IndexOf(group) + " Panic: " + group.Panic);
|
||||
foreach (var entity in group.Entities)
|
||||
{
|
||||
var soldier = (Soldier)entity;
|
||||
Debug.WriteLine(soldier.Name + " " + soldier.GetHashCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Next turn
|
||||
if (ks.IsKeyDown(Keys.Enter) && lastKeyboardState.IsKeyUp(Keys.Enter))
|
||||
{
|
||||
if (core.TurnManager.CurrentTurn == core.TurnManager["Player"])
|
||||
{
|
||||
foreach (var unit in core.Squad)
|
||||
{
|
||||
unit.AP = unit.MaxActionPoints;
|
||||
unit.Fired = false;
|
||||
}
|
||||
|
||||
core.TurnManager.EndTurn();
|
||||
}
|
||||
|
||||
if (core.TurnManager.CurrentTurn == core.TurnManager["Computer"])
|
||||
{
|
||||
foreach (var enemy in core.Swarm)
|
||||
{
|
||||
enemy.step = 0;
|
||||
enemy.AttackedThisTurn = false;
|
||||
Point target = Point.Zero;
|
||||
float distance = 7000;
|
||||
foreach (var unit in core.Squad)
|
||||
{
|
||||
Vector2 soldier = new Vector2(unit.Transform.Grid.X, unit.Transform.Grid.Y);
|
||||
Vector2 monster = new Vector2(enemy.Transform.Grid.X, enemy.Transform.Grid.Y);
|
||||
|
||||
float newDistance = Vector2.Distance(soldier, monster);
|
||||
|
||||
if (newDistance < distance)
|
||||
{
|
||||
target = unit.Transform.Grid;
|
||||
distance = newDistance;
|
||||
}
|
||||
}
|
||||
enemy.GetComponent<Component.PathFinder>().Goal = target;
|
||||
distance = 7000;
|
||||
|
||||
}
|
||||
|
||||
core.TestMonster.step = 0;
|
||||
Point testTarget = Point.Zero;
|
||||
float testDistance = 7000;
|
||||
foreach (var unit in core.Squad)
|
||||
{
|
||||
Vector2 soldier = new Vector2(unit.Transform.Grid.X, unit.Transform.Grid.Y);
|
||||
Vector2 monster = new Vector2(core.TestMonster.Transform.Grid.X, core.TestMonster.Transform.Grid.Y);
|
||||
|
||||
float newDistance = Vector2.Distance(soldier, monster);
|
||||
|
||||
if (newDistance < testDistance)
|
||||
{
|
||||
testTarget = unit.Transform.Grid;
|
||||
testDistance = newDistance;
|
||||
}
|
||||
}
|
||||
core.TestMonster.GetComponent<Component.PathFinder>().Goal = testTarget;
|
||||
testDistance = 7000;
|
||||
|
||||
core.TurnManager.EndTurn();
|
||||
}
|
||||
}
|
||||
if (ks.IsKeyUp(Keys.O) && lastKeyboardState.IsKeyDown(Keys.O))
|
||||
{
|
||||
EntityManager.GetEntities<Door>()[0].Toggle();
|
||||
}
|
||||
if (ks.IsKeyDown(Keys.S) || ks.IsKeyDown(Keys.R))
|
||||
{
|
||||
foreach (var soldier in core.Squad)
|
||||
{
|
||||
if (soldier.Selected == true && soldier.Fired == false)
|
||||
{
|
||||
bool enoughActionPoints = true;
|
||||
int cost = 0;
|
||||
string type = "";
|
||||
if (ks.IsKeyDown(Keys.S))
|
||||
{
|
||||
cost = bulletCost;
|
||||
type = "bullet";
|
||||
}
|
||||
else if (ks.IsKeyDown(Keys.R))
|
||||
{
|
||||
cost = rocketCost;
|
||||
type = "Rocket";
|
||||
}
|
||||
if (soldier.AP >= cost)
|
||||
{
|
||||
core.Volley.Add(new Shot(soldier.GetComponent<Component.Stat>(), type));
|
||||
soldier.AP -= cost;
|
||||
soldier.Fired = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
enoughActionPoints = false;
|
||||
}
|
||||
if (enoughActionPoints == true)
|
||||
{
|
||||
foreach (var shot in core.Volley)
|
||||
{
|
||||
if (shot.select == false)
|
||||
{
|
||||
shot.select = true;
|
||||
shot.X = soldier.X;
|
||||
shot.Y = soldier.Y;
|
||||
//shot.Transform.World.X += Grid.TileSize / 2;
|
||||
//shot.Transform.World.Y += Grid.TileSize / 2;
|
||||
}
|
||||
if (shot.direction == Vector2.Zero)
|
||||
{
|
||||
double directionX = Math.Cos(soldier.Transform.World.Rotation);
|
||||
double directionY = Math.Sin(soldier.Transform.World.Rotation);
|
||||
shot.direction = new Vector2((float)directionX, (float)directionY);
|
||||
shot.Transform.World.Rotation = soldier.Transform.World.Rotation;
|
||||
Vector2 yo = soldier.Transform.World.Position;
|
||||
shot.Stat.Remember = yo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ks.IsKeyDown(Keys.C))
|
||||
{
|
||||
foreach (var soldier in core.Squad)
|
||||
{
|
||||
if (soldier.Selected == true && soldier.Fired == false)
|
||||
{
|
||||
Point checker = Point.Zero;
|
||||
double directionX = Math.Cos(soldier.GetComponent<Component.Transform>().World.Rotation);
|
||||
double directionY = Math.Sin(soldier.GetComponent<Component.Transform>().World.Rotation);
|
||||
Vector2 direction = new Vector2((int)directionX, (int)directionY);
|
||||
int range = 120;
|
||||
int current = 0;
|
||||
bool hit = false;
|
||||
checker = new Point((int)soldier.Transform.World.Origin.X, (int)soldier.Transform.World.Origin.Y);
|
||||
do
|
||||
{
|
||||
checker.X += (int)direction.X * checkerSpeed;
|
||||
checker.Y += (int)direction.Y * checkerSpeed;
|
||||
foreach (var creature in core.Swarm)
|
||||
{
|
||||
if (creature.GetComponent<Component.Collision>().Rectangle.Contains(checker))
|
||||
{
|
||||
hit = true;
|
||||
}
|
||||
}
|
||||
if (core.TestMonster.GetComponent<Component.Collision>().Rectangle.Contains(checker))
|
||||
{
|
||||
|
||||
}
|
||||
current++;
|
||||
} while (hit == false && current < range);
|
||||
current = 0;
|
||||
if (soldier.Selected == true && soldier.Fired == false && hit == true)
|
||||
{
|
||||
core.Volley.Add(new Shot(soldier.GetComponent<Component.Stat>(), "Bullet"));
|
||||
soldier.Fired = true;
|
||||
foreach (var shot in core.Volley)
|
||||
{
|
||||
if (shot.select == false)
|
||||
{
|
||||
shot.select = true;
|
||||
shot.X = soldier.X;
|
||||
shot.Y = soldier.Y;
|
||||
//shot.Transform.World.X += Grid.TileSize / 2;
|
||||
//shot.Transform.World.Y += Grid.TileSize / 2;
|
||||
}
|
||||
if (shot.direction == Vector2.Zero)
|
||||
{
|
||||
shot.direction = new Vector2((float)directionX, (float)directionY);
|
||||
shot.Transform.World.Rotation = soldier.Transform.World.Rotation;
|
||||
}
|
||||
}
|
||||
}
|
||||
hit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lastKeyboardState = ks;
|
||||
}
|
||||
}
|
||||
if (ks.IsKeyDown(Keys.A))
|
||||
{
|
||||
/*foreach (var unit in core.Swarm)
|
||||
{
|
||||
unit.X = 200;
|
||||
unit.Y = 200;
|
||||
}*/
|
||||
core.TestMonster.X = 12;
|
||||
core.TestMonster.Y = 4;
|
||||
}
|
||||
if (ks.IsKeyUp(Keys.O) && lastKeyboardState.IsKeyDown(Keys.O))
|
||||
{
|
||||
EntityManager.GetEntities<Door>()[0].Toggle();
|
||||
}
|
||||
if (ks.IsKeyDown(Keys.S) || ks.IsKeyDown(Keys.R))
|
||||
{
|
||||
foreach (var soldier in core.Squad)
|
||||
{
|
||||
if (soldier.Selected == true && soldier.Fired == false)
|
||||
{
|
||||
bool enoughActionPoints = true;
|
||||
int cost = 0;
|
||||
string type = "";
|
||||
if (ks.IsKeyDown(Keys.S))
|
||||
{
|
||||
cost = bulletCost;
|
||||
type = "bullet";
|
||||
}
|
||||
else if (ks.IsKeyDown(Keys.R))
|
||||
{
|
||||
cost = rocketCost;
|
||||
type = "Rocket";
|
||||
}
|
||||
if (soldier.AP >= cost)
|
||||
{
|
||||
core.Volley.Add(new Shot(soldier.GetComponent<Component.Stat>(), type));
|
||||
soldier.AP -= cost;
|
||||
soldier.Fired = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
enoughActionPoints = false;
|
||||
}
|
||||
if (enoughActionPoints == true)
|
||||
{
|
||||
foreach (var shot in core.Volley)
|
||||
{
|
||||
if (shot.select == false)
|
||||
{
|
||||
shot.select = true;
|
||||
shot.X = soldier.X;
|
||||
shot.Y = soldier.Y;
|
||||
//shot.Transform.World.X += Grid.TileSize / 2;
|
||||
//shot.Transform.World.Y += Grid.TileSize / 2;
|
||||
}
|
||||
if (shot.direction == Vector2.Zero)
|
||||
{
|
||||
double directionX = Math.Cos(soldier.Transform.World.Rotation);
|
||||
double directionY = Math.Sin(soldier.Transform.World.Rotation);
|
||||
shot.direction = new Vector2((float)directionX, (float)directionY);
|
||||
shot.Transform.World.Rotation = soldier.Transform.World.Rotation;
|
||||
Vector2 yo = soldier.Transform.World.Position;
|
||||
shot.Stat.Remember = yo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ks.IsKeyDown(Keys.C))
|
||||
{
|
||||
foreach (var soldier in core.Squad)
|
||||
{
|
||||
if (soldier.Selected == true && soldier.Fired == false)
|
||||
{
|
||||
Point checker = Point.Zero;
|
||||
double directionX = Math.Cos(soldier.GetComponent<Component.Transform>().World.Rotation);
|
||||
double directionY = Math.Sin(soldier.GetComponent<Component.Transform>().World.Rotation);
|
||||
Vector2 direction = new Vector2((int)directionX, (int)directionY);
|
||||
int range = 120;
|
||||
int current = 0;
|
||||
bool hit = false;
|
||||
checker = new Point((int)soldier.Transform.World.Origin.X, (int)soldier.Transform.World.Origin.Y);
|
||||
do
|
||||
{
|
||||
checker.X += (int)direction.X * checkerSpeed;
|
||||
checker.Y += (int)direction.Y * checkerSpeed;
|
||||
foreach (var creature in core.Swarm)
|
||||
{
|
||||
if (creature.GetComponent<Component.Collision>().Rectangle.Contains(checker))
|
||||
{
|
||||
hit = true;
|
||||
}
|
||||
}
|
||||
if (core.TestMonster.GetComponent<Component.Collision>().Rectangle.Contains(checker))
|
||||
{
|
||||
|
||||
}
|
||||
current++;
|
||||
} while (hit == false && current < range);
|
||||
current = 0;
|
||||
if (soldier.Selected == true && soldier.Fired == false && hit == true)
|
||||
{
|
||||
core.Volley.Add(new Shot(soldier.GetComponent<Component.Stat>(), "Bullet"));
|
||||
soldier.Fired = true;
|
||||
foreach (var shot in core.Volley)
|
||||
{
|
||||
if (shot.select == false)
|
||||
{
|
||||
shot.select = true;
|
||||
shot.X = soldier.X;
|
||||
shot.Y = soldier.Y;
|
||||
//shot.Transform.World.X += Grid.TileSize / 2;
|
||||
//shot.Transform.World.Y += Grid.TileSize / 2;
|
||||
}
|
||||
if (shot.direction == Vector2.Zero)
|
||||
{
|
||||
shot.direction = new Vector2((float)directionX, (float)directionY);
|
||||
shot.Transform.World.Rotation = soldier.Transform.World.Rotation;
|
||||
}
|
||||
}
|
||||
}
|
||||
hit = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lastKeyboardState = ks;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,8 @@ namespace DepthsBelow
|
||||
{
|
||||
//EntityManager entityManager;
|
||||
|
||||
int wakingDistance = 6;
|
||||
int wakingDistance = 7;
|
||||
int sleepingDistance = 6;
|
||||
|
||||
List<SmallEnemy> swarm;
|
||||
|
||||
@@ -33,7 +34,7 @@ namespace DepthsBelow
|
||||
this.GetComponent<Component.Transform>().Grid.Position.Y);
|
||||
Vector2 distance2 = new Vector2(entity.GetComponent<Component.Transform>().Grid.Position.X,
|
||||
entity.GetComponent<Component.Transform>().Grid.Position.Y);
|
||||
if (Vector2.Distance(distance1, distance2) < wakingDistance)
|
||||
if (Vector2.Distance(distance1, distance2) < wakingDistance/* && Vector2.Distance(distance1, distance2) > sleepingDistance*/)
|
||||
{
|
||||
var enemy = new SmallEnemy(ref swarm);
|
||||
enemy.X = this.X;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace DepthsBelow
|
||||
MouseState lastMouseState;
|
||||
Rectangle selectionRectangle;
|
||||
Texture2D selectionTexture;
|
||||
Rectangle gridRectangle;
|
||||
public Rectangle gridRectangle;
|
||||
Texture2D gridTexture;
|
||||
|
||||
Vector2 directionStart;
|
||||
|
||||
@@ -1,173 +1,179 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DepthsBelow.Component;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
|
||||
namespace DepthsBelow
|
||||
{
|
||||
public class SmallEnemy : Entity
|
||||
{
|
||||
public static Texture2D Texture;
|
||||
public Color Color;
|
||||
public static Point Origin;
|
||||
private bool _selected; //I guess as in "currently doing something"
|
||||
|
||||
public List<SmallEnemy> Swarm;
|
||||
|
||||
private PathFinder.Node nextNode;
|
||||
|
||||
public int numberOfSteps = 5;
|
||||
public int currentStep = 0;
|
||||
|
||||
public int step
|
||||
{
|
||||
get { return currentStep; }
|
||||
set
|
||||
{
|
||||
currentStep = value;
|
||||
}
|
||||
}
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DepthsBelow.Component;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
|
||||
namespace DepthsBelow
|
||||
{
|
||||
public class SmallEnemy : Entity
|
||||
{
|
||||
public static Texture2D Texture;
|
||||
public Color Color;
|
||||
public static Point Origin;
|
||||
private bool _selected; //I guess as in "currently doing something"
|
||||
|
||||
public List<SmallEnemy> Swarm;
|
||||
|
||||
private PathFinder.Node nextNode;
|
||||
|
||||
public int numberOfSteps = 5;
|
||||
public int currentStep = 0;
|
||||
|
||||
public bool AttackedThisTurn = false;
|
||||
|
||||
public int step
|
||||
{
|
||||
get { return currentStep; }
|
||||
set
|
||||
{
|
||||
currentStep = value;
|
||||
}
|
||||
}
|
||||
|
||||
public SmallEnemy(ref List<SmallEnemy> swarm)
|
||||
: base()
|
||||
{
|
||||
if (Texture == null)
|
||||
LoadContent();
|
||||
|
||||
this.Swarm = swarm;
|
||||
|
||||
Transform.World.Origin = new Vector2(20, 16);
|
||||
|
||||
this.Color = Color.White;
|
||||
var rc = new SpriteRenderer(this) { Texture = Texture, Color = Color.White };
|
||||
AddComponent(rc);
|
||||
|
||||
: base()
|
||||
{
|
||||
if (Texture == null)
|
||||
LoadContent();
|
||||
|
||||
this.Swarm = swarm;
|
||||
|
||||
Transform.World.Origin = new Vector2(20, 16);
|
||||
|
||||
this.Color = Color.White;
|
||||
var rc = new SpriteRenderer(this) { Texture = Texture, Color = Color.White };
|
||||
AddComponent(rc);
|
||||
|
||||
var cc = new Collision(this, 32, 32);
|
||||
cc.Solid = true;
|
||||
AddComponent(cc);
|
||||
|
||||
var pfc = new PathFinder(this);
|
||||
AddComponent(pfc);
|
||||
|
||||
var stat = new Component.Stat(this)
|
||||
{
|
||||
Life = 2,
|
||||
Defence = 2,
|
||||
Strength = 5000,
|
||||
GetAim = 100,
|
||||
GetDodge = 50
|
||||
};
|
||||
AddComponent(stat);
|
||||
}
|
||||
public override void Remove()
|
||||
{
|
||||
Swarm.Remove(this);
|
||||
|
||||
base.Remove();
|
||||
}
|
||||
|
||||
public bool Selected
|
||||
{
|
||||
get { return _selected; }
|
||||
set
|
||||
{
|
||||
_selected = value;
|
||||
GetComponent<SpriteRenderer>().Color = (value) ? Color.Blue : this.Color;
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadContent()
|
||||
{
|
||||
Texture = GameServices.GetService<ContentManager>().Load<Texture2D>("images/Monster");
|
||||
}
|
||||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
base.Update(gameTime);
|
||||
|
||||
float elapsed = gameTime.ElapsedGameTime.Milliseconds / 1000.0f;
|
||||
|
||||
if (nextNode == null)
|
||||
nextNode = GetComponent<PathFinder>().Next();
|
||||
|
||||
if (nextNode != null)
|
||||
{
|
||||
List<Point> soldierCollisions = new List<Point>();
|
||||
|
||||
// Collision with moving units
|
||||
foreach (var body in Swarm)
|
||||
{
|
||||
if (body != this)
|
||||
{
|
||||
if (body.Transform.Grid == nextNode.Position)
|
||||
{
|
||||
soldierCollisions.Add(body.Transform.Grid);
|
||||
GetComponent<PathFinder>().RecreatePath(soldierCollisions);
|
||||
nextNode = GetComponent<PathFinder>().Next();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (nextNode != null)
|
||||
{
|
||||
var nodeWorldPos = Grid.GridToWorld(nextNode.Position);
|
||||
// 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)
|
||||
{
|
||||
currentStep++;
|
||||
//lastLastNode = lastNode;
|
||||
//lastNode = nextNode;
|
||||
nextNode = GetComponent<PathFinder>().Next();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
GetComponent<PathFinder>().Stop();
|
||||
}
|
||||
foreach (var entity in EntityManager.Entities)
|
||||
{
|
||||
if (entity is Soldier)
|
||||
{
|
||||
if (entity.GetComponent<Component.Collision>().Rectangle.Intersects(this.GetComponent<Component.Collision>().Rectangle))
|
||||
{
|
||||
if (Utility.AttackTest(this.GetComponent<Component.Stat>(), entity, Utility.CalculateHitChance(this.GetComponent<Component.Stat>(), this.Transform.World.Position, entity)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
cc.Solid = true;
|
||||
AddComponent(cc);
|
||||
|
||||
var pfc = new PathFinder(this);
|
||||
AddComponent(pfc);
|
||||
|
||||
var stat = new Component.Stat(this)
|
||||
{
|
||||
Life = 50,
|
||||
Defence = 25,
|
||||
Strength = 26,
|
||||
GetAim = 100,
|
||||
GetDodge = 50
|
||||
};
|
||||
AddComponent(stat);
|
||||
}
|
||||
public override void Remove()
|
||||
{
|
||||
Swarm.Remove(this);
|
||||
|
||||
base.Remove();
|
||||
}
|
||||
|
||||
public bool Selected
|
||||
{
|
||||
get { return _selected; }
|
||||
set
|
||||
{
|
||||
_selected = value;
|
||||
GetComponent<SpriteRenderer>().Color = (value) ? Color.Blue : this.Color;
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadContent()
|
||||
{
|
||||
Texture = GameServices.GetService<ContentManager>().Load<Texture2D>("images/Monster");
|
||||
}
|
||||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
base.Update(gameTime);
|
||||
|
||||
float elapsed = gameTime.ElapsedGameTime.Milliseconds / 1000.0f;
|
||||
|
||||
if (nextNode == null)
|
||||
nextNode = GetComponent<PathFinder>().Next();
|
||||
|
||||
if (nextNode != null)
|
||||
{
|
||||
List<Point> soldierCollisions = new List<Point>();
|
||||
|
||||
// Collision with moving units
|
||||
foreach (var body in Swarm)
|
||||
{
|
||||
if (body != this)
|
||||
{
|
||||
if (body.Transform.Grid == nextNode.Position)
|
||||
{
|
||||
soldierCollisions.Add(body.Transform.Grid);
|
||||
GetComponent<PathFinder>().RecreatePath(soldierCollisions);
|
||||
nextNode = GetComponent<PathFinder>().Next();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (nextNode != null)
|
||||
{
|
||||
var nodeWorldPos = Grid.GridToWorld(nextNode.Position);
|
||||
// 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)
|
||||
{
|
||||
currentStep++;
|
||||
//lastLastNode = lastNode;
|
||||
//lastNode = nextNode;
|
||||
nextNode = GetComponent<PathFinder>().Next();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
GetComponent<PathFinder>().Stop();
|
||||
}
|
||||
foreach (var entity in EntityManager.Entities)
|
||||
{
|
||||
if (entity is Soldier)
|
||||
{
|
||||
if (entity.GetComponent<Component.Collision>().Rectangle.Intersects(this.GetComponent<Component.Collision>().Rectangle))
|
||||
{
|
||||
if (AttackedThisTurn == false)
|
||||
{
|
||||
if (Utility.AttackTest(this.GetComponent<Component.Stat>(), entity, Utility.CalculateHitChance(this.GetComponent<Component.Stat>(), this.Transform.World.Position, entity)))
|
||||
{
|
||||
AttackedThisTurn = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,8 +78,8 @@ namespace DepthsBelow
|
||||
{
|
||||
MaxHP = 100,
|
||||
MaxPanic = 100,
|
||||
//Life = 10,
|
||||
Defence = 10,
|
||||
Life = 100,
|
||||
Defence = 25,
|
||||
Strength = 50,
|
||||
GetAim = 40,
|
||||
GetDodge = 20
|
||||
|
||||
@@ -1,38 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.0" orientation="orthogonal" width="100" height="100" tilewidth="32" tileheight="32">
|
||||
<tileset firstgid="1" name="Aztek" tilewidth="32" tileheight="32">
|
||||
<image source="tilesets/aztek.png" width="480" height="693"/>
|
||||
</tileset>
|
||||
<tileset firstgid="316" name="Collision" tilewidth="32" tileheight="32">
|
||||
<image source="tilesets/collision.png" width="32" height="32"/>
|
||||
</tileset>
|
||||
<layer name="Floor" width="100" height="100">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzt1sEJgEAMAMED++/ZCsTzYVxhBtJA9pGsBQAA0HVsDHP0aNjpoMccPZr0aNGjS4MWPVr0aHjya2n1Pj2a7nauxyw9WvRouerhjnxDjxY9WvRocc9b9GjRo0WPFj1a9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4M9ODsMCBQ==
|
||||
</data>
|
||||
</layer>
|
||||
<layer name="Tile Layer 1" width="100" height="100">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzt2MlOwzAQBmA/Ajvc2OEGYr0BLcuN7f2fhqlUS1GqNCfHQfk+6ZeqxAdLk2TGTQkAAMg2IpuRrTXZjuzU2uDEHEaOIsdrchI5rbS/KVk8+w+Rx551N5Hb8tuZvMWz/x756FmnHsN4iexHDnrWqccwviMXkcuedeoxnKfIc1p9V3Yje8vrs8i8xuYm6DPylVbflbPI+fL6Ir9VdjdtV5Hr5W/fqHrymbA5+95F7pPzYQ35TNicfV8jb8n5sIbc07v6eU6+71tWVu7p6/p5s9+rxzD6+nm+rx7D6KpHu9/nXq+vl9VVj3a/z71eXy+rqx7N602+W2Wpx7h01aM9D+dZeJb8r1VSVz3a83CehX+S/7VKMu+Oi3qMi3qMi3qMi3oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPDf/QHD8yhT
|
||||
</data>
|
||||
</layer>
|
||||
<layer name="Tile Layer 2" width="100" height="100">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzt0bEJgEAQRNHrx6tAq/BswP6rcCODC0Qw2BXeg58PTGsAAADwbERH9ghu/qjFH7X4AwAAgLfWaMseAQB8skQ9ewQAv7JPkeucAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAai5YqQYl
|
||||
</data>
|
||||
</layer>
|
||||
<objectgroup name="Object Layer 1" width="100" height="100" visible="0">
|
||||
<object type="SquadStart" gid="4" x="352" y="352"/>
|
||||
<object type="SquadStart" gid="4" x="416" y="352"/>
|
||||
<object type="SquadStart" gid="4" x="352" y="384"/>
|
||||
<object type="SquadStart" gid="4" x="384" y="384"/>
|
||||
<object type="SquadStart" gid="4" x="384" y="352"/>
|
||||
<object type="MonsterSpawn" gid="5" x="544" y="480"/>
|
||||
<object type="MonsterSpawn" gid="5" x="768" y="608"/>
|
||||
</objectgroup>
|
||||
<layer name="Collision" width="100" height="100">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzt1rENAyEQAMF3X+6/LpdgeA5pgxnpUoJbCXgeAJj1/dwd9ujRokeLHi0ne9Rknh4tJ7vTY54eLe6rFj1advfpz3vX7R7s0aNlcpd6nLvdQ5M9E/fVv7NYp0eLHi0nPVbPZJ0eLXq06NFy+z1njx49erTo0aJHix49K+/6m+EdPVr06LFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoO4HZimKNQ==
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.0" orientation="orthogonal" width="100" height="100" tilewidth="32" tileheight="32">
|
||||
<tileset firstgid="1" name="Aztek" tilewidth="32" tileheight="32">
|
||||
<image source="tilesets/aztek.png" width="480" height="693"/>
|
||||
</tileset>
|
||||
<tileset firstgid="316" name="Collision" tilewidth="32" tileheight="32">
|
||||
<image source="tilesets/collision.png" width="32" height="32"/>
|
||||
</tileset>
|
||||
<layer name="Floor" width="100" height="100">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzt1sEJgEAMAMED++/ZCsTzYVxhBtJA9pGsBQAA0HVsDHP0aNjpoMccPZr0aNGjS4MWPVr0aHjya2n1Pj2a7nauxyw9WvRouerhjnxDjxY9WvRocc9b9GjRo0WPFj1a9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4M9ODsMCBQ==
|
||||
</data>
|
||||
</layer>
|
||||
<layer name="Tile Layer 1" width="100" height="100">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzt2MlOwzAQBmA/Ajvc2OEGYr0BLcuN7f2fhqlUS1GqNCfHQfk+6ZeqxAdLk2TGTQkAAMg2IpuRrTXZjuzU2uDEHEaOIsdrchI5rbS/KVk8+w+Rx551N5Hb8tuZvMWz/x756FmnHsN4iexHDnrWqccwviMXkcuedeoxnKfIc1p9V3Yje8vrs8i8xuYm6DPylVbflbPI+fL6Ir9VdjdtV5Hr5W/fqHrymbA5+95F7pPzYQ35TNicfV8jb8n5sIbc07v6eU6+71tWVu7p6/p5s9+rxzD6+nm+rx7D6KpHu9/nXq+vl9VVj3a/z71eXy+rqx7N602+W2Wpx7h01aM9D+dZeJb8r1VSVz3a83CehX+S/7VKMu+Oi3qMi3qMi3qMi3oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPDf/QHD8yhT
|
||||
</data>
|
||||
</layer>
|
||||
<layer name="Tile Layer 2" width="100" height="100">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzt0bEJgEAQRNHrx6tAq/BswP6rcCODC0Qw2BXeg58PTGsAAADwbERH9ghu/qjFH7X4AwAAgLfWaMseAQB8skQ9ewQAv7JPkeucAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAai5YqQYl
|
||||
</data>
|
||||
</layer>
|
||||
<objectgroup name="Object Layer 1" width="100" height="100" visible="0">
|
||||
<object type="SquadStart" gid="4" x="352" y="352"/>
|
||||
<object type="SquadStart" gid="4" x="416" y="352"/>
|
||||
<object type="SquadStart" gid="4" x="352" y="384"/>
|
||||
<object type="SquadStart" gid="4" x="384" y="384"/>
|
||||
<object type="SquadStart" gid="4" x="384" y="352"/>
|
||||
<object type="MonsterSpawn" gid="5" x="544" y="480"/>
|
||||
<object type="MonsterSpawn" gid="5" x="768" y="608"/>
|
||||
<object type="MonsterSpawn" gid="5" x="768" y="576"/>
|
||||
<object type="MonsterSpawn" gid="5" x="672" y="288"/>
|
||||
<object type="MonsterSpawn" gid="5" x="704" y="832"/>
|
||||
<object type="MonsterSpawn" gid="5" x="864" y="832"/>
|
||||
<object type="MonsterSpawn" gid="5" x="576" y="896"/>
|
||||
<object type="MonsterSpawn" gid="5" x="448" y="576"/>
|
||||
<object type="MonsterSpawn" gid="5" x="560" y="670"/>
|
||||
</objectgroup>
|
||||
<layer name="Collision" width="100" height="100">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJzt1rENAyEQAMF3X+6/LpdgeA5pgxnpUoJbCXgeAJj1/dwd9ujRokeLHi0ne9Rknh4tJ7vTY54eLe6rFj1advfpz3vX7R7s0aNlcpd6nLvdQ5M9E/fVv7NYp0eLHi0nPVbPZJ0eLXq06NFy+z1njx49erTo0aJHix49K+/6m+EdPVr06LFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoO4HZimKNQ==
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
||||
|
||||
Reference in New Issue
Block a user