minor changes during day
This commit is contained in:
parent
5aa906a66b
commit
a3b2fb2b81
2 changed files with 3 additions and 1 deletions
|
@ -11,6 +11,7 @@ namespace DangerousD.GameCore.Levels
|
||||||
public void InitLevel()
|
public void InitLevel()
|
||||||
{
|
{
|
||||||
new Player(new Vector2(0,0));
|
new Player(new Vector2(0,0));
|
||||||
|
|
||||||
var Zombie = new Zombie(new Vector2(256, 128));
|
var Zombie = new Zombie(new Vector2(256, 128));
|
||||||
var Frank = new Frank(new Vector2(384, 128));
|
var Frank = new Frank(new Vector2(384, 128));
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ namespace DangerousD.GameCore.Managers
|
||||||
{
|
{
|
||||||
for (int i = 0; i < livingEntities.Count; i++)
|
for (int i = 0; i < livingEntities.Count; i++)
|
||||||
{
|
{
|
||||||
|
Rectangle oldRect = new Rectangle();
|
||||||
for (int j = 0; j < mapObjects.Count; j++)
|
for (int j = 0; j < mapObjects.Count; j++)
|
||||||
{
|
{
|
||||||
if (livingEntities[i].Rectangle.Intersects(mapObjects[j].Rectangle))
|
if (livingEntities[i].Rectangle.Intersects(mapObjects[j].Rectangle))
|
||||||
|
@ -68,7 +69,7 @@ namespace DangerousD.GameCore.Managers
|
||||||
livingEntities[i].SetPosition(new Vector2(livingEntities[i].Pos.X,
|
livingEntities[i].SetPosition(new Vector2(livingEntities[i].Pos.X,
|
||||||
livingEntities[i].Pos.Y - (livingEntities[i].Rectangle.Bottom - mapObjects[j].Rectangle.Top)));
|
livingEntities[i].Pos.Y - (livingEntities[i].Rectangle.Bottom - mapObjects[j].Rectangle.Top)));
|
||||||
}
|
}
|
||||||
if (livingEntities[i].Rectangle.Top < mapObjects[j].Rectangle.Bottom)
|
if (livingEntities[i].Rectangle.Top > mapObjects[j].Rectangle.Bottom)
|
||||||
{
|
{
|
||||||
livingEntities[i].velocity.Y = 0;
|
livingEntities[i].velocity.Y = 0;
|
||||||
livingEntities[i].SetPosition(new Vector2(livingEntities[i].Pos.X,
|
livingEntities[i].SetPosition(new Vector2(livingEntities[i].Pos.X,
|
||||||
|
|
Loading…
Add table
Reference in a new issue