finaly some working stuff
This commit is contained in:
parent
d098ef2e00
commit
aec49ff1ed
5 changed files with 1981 additions and 1092 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -134,7 +134,7 @@ namespace ZoFo.GameCore.GameManagers.MapManager
|
|||
{
|
||||
if (tile.Objectgroup == null)
|
||||
{
|
||||
return new List<Rectangle>();
|
||||
return new List<Rectangle>() { new Rectangle(0, 0, 0, 0) };
|
||||
}
|
||||
|
||||
List<Rectangle> collisionRectangles = new List<Rectangle>();
|
||||
|
|
|
@ -20,13 +20,10 @@ public class StopObject : MapObject
|
|||
{
|
||||
collisionComponents[i] = new CollisionComponent(this, true, new Rectangle(0,0, (int)size.X, (int)size.Y)/*collisions[i]*/);
|
||||
}
|
||||
//REDO
|
||||
// TODO: Написать коллизию, пусть тразмер будет чисто таким же как и текстурка.
|
||||
// Поменяйте уровень защиты конструктора, после снимите в MapManager комментарий в методе LoadMap с создания StopObject-а
|
||||
}
|
||||
public override void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
base.Draw(spriteBatch);
|
||||
DrawDebugRectangle(spriteBatch, new Rectangle((int)position.X, (int)position.Y, collisionComponents[0].stopRectangle.Width, collisionComponents[0].stopRectangle.Height));
|
||||
DrawDebugRectangle(spriteBatch, new Rectangle((int)position.X, (int)position.Y, collisionComponents[0].stopRectangle.Width, collisionComponents[0].stopRectangle.Height));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ namespace ZoFo.GameCore
|
|||
players = new List<Player>();
|
||||
new MapManager().LoadMap();
|
||||
|
||||
AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(0, 0)));
|
||||
//AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(0, 0)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(740, 140)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Zombie(new Vector2(1000, 1000)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Ammo(new Vector2(140, 440)));
|
||||
|
|
Loading…
Add table
Reference in a new issue