fixbugs
This commit is contained in:
parent
833da68a4e
commit
cbcffe8d48
8 changed files with 16 additions and 117 deletions
|
@ -12,23 +12,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
{
|
{
|
||||||
internal class Frank : CoreEnemy
|
internal class Frank : CoreEnemy
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
private Vector2 position;
|
|
||||||
private bool isGoRight = false;
|
|
||||||
|
|
||||||
public Vector2 Position
|
|
||||||
{
|
|
||||||
get { return position; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public Frank(Vector2 position) : base(position)
|
|
||||||
{
|
|
||||||
this.position = position;
|
|
||||||
=======
|
|
||||||
public Frank(Vector2 position) : base(position)
|
public Frank(Vector2 position) : base(position)
|
||||||
{
|
{
|
||||||
isGoRight = false;
|
isGoRight = false;
|
||||||
>>>>>>> livingEntitiesVlad
|
|
||||||
Width = 112;
|
Width = 112;
|
||||||
Height = 160;
|
Height = 160;
|
||||||
leftBoarder = 50;
|
leftBoarder = 50;
|
||||||
|
|
|
@ -37,7 +37,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
|
|
||||||
public override void Update(GameTime gameTime)
|
public override void Update(GameTime gameTime)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
if(!isAttacking)
|
if(!isAttacking)
|
||||||
{
|
{
|
||||||
Move(gameTime);
|
Move(gameTime);
|
||||||
|
@ -45,12 +44,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
|
|
||||||
base.Update(gameTime);
|
base.Update(gameTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
base.Update(gameTime);
|
|
||||||
}
|
|
||||||
>>>>>>> livingEntitiesVlad
|
|
||||||
public override void Attack()
|
public override void Attack()
|
||||||
{
|
{
|
||||||
collision = new Rectangle((int)position.X, (int)position.Y, 40, 40);
|
collision = new Rectangle((int)position.X, (int)position.Y, 40, 40);
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
}
|
}
|
||||||
currentTime++;
|
currentTime++;
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
private void SpawnAttackBall()
|
private void SpawnAttackBall()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < balls.Count; i++)
|
for (int i = 0; i < balls.Count; i++)
|
||||||
|
@ -71,14 +71,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
|
|
||||||
public override void Attack(GameTime gameTime)
|
public override void Attack(GameTime gameTime)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> livingEntitiesVlad
|
|
||||||
public override void Death()
|
public override void Death()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
if (GraphicsComponent.GetCurrentAnimation != "SlimeReadyJumpLeftBottom")
|
if (GraphicsComponent.GetCurrentAnimation != "SlimeReadyJumpLeftBottom")
|
||||||
{
|
{
|
||||||
GraphicsComponent.StartAnimation("SlimeReadyJumpLeftBottom");
|
GraphicsComponent.StartAnimation("SlimeReadyJumpLeftBottom");
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
delay--;
|
delay--;
|
||||||
if (delay <= 0)
|
if (delay <= 0)
|
||||||
|
@ -150,13 +148,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
spriteBatch.Draw(debugTexture, new Rectangle((int)Pos.X, (int)Pos.Y + Height, 48, 5), Color.White);
|
spriteBatch.Draw(debugTexture, new Rectangle((int)Pos.X, (int)Pos.Y + Height, 48, 5), Color.White);
|
||||||
base.Draw(spriteBatch);
|
base.Draw(spriteBatch);
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
public override void Attack(GameTime gameTime)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> livingEntitiesVlad
|
|
||||||
public override void Death()
|
public override void Death()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -244,7 +235,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
|
|
||||||
public override void Target()
|
public override void Target()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Attack(GameTime gameTime)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,17 +17,13 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
float leftBorder;
|
float leftBorder;
|
||||||
float rightBorder;
|
float rightBorder;
|
||||||
bool isAttaking = false;
|
bool isAttaking = false;
|
||||||
<<<<<<< HEAD
|
|
||||||
bool isTarget = false;
|
bool isTarget = false;
|
||||||
PhysicsManager physicsManager;
|
PhysicsManager physicsManager;
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> livingEntitiesVlad
|
|
||||||
public Zombie(Vector2 position) : base(position)
|
public Zombie(Vector2 position) : base(position)
|
||||||
{
|
{
|
||||||
Width = 24;
|
Width = 24;
|
||||||
Height = 40;
|
Height = 40;
|
||||||
monster_speed = 1;
|
monster_speed = 3;
|
||||||
name = "Zombie";
|
name = "Zombie";
|
||||||
leftBorder = (int)position.X - 100;
|
leftBorder = (int)position.X - 100;
|
||||||
rightBorder = (int)position.X + 100;
|
rightBorder = (int)position.X + 100;
|
||||||
|
@ -115,36 +111,29 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
}
|
}
|
||||||
base.OnCollision(gameObject);
|
base.OnCollision(gameObject);
|
||||||
}
|
}
|
||||||
|
public override void Target()
|
||||||
<<<<<<< HEAD
|
|
||||||
public void Target()
|
|
||||||
{
|
{
|
||||||
if(AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X-50, (int)Pos.Y, Width+100, Height), typeof(Player))!=null)
|
if (AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - 50, (int)Pos.Y, Width + 100, Height), typeof(Player)) != null)
|
||||||
{
|
{
|
||||||
if(isGoRight && this._pos.X <= AppManager.Instance.GameManager.players[0].Pos.X)
|
if (isGoRight && this._pos.X <= AppManager.Instance.GameManager.players[0].Pos.X)
|
||||||
{
|
{
|
||||||
isTarget = true;
|
isTarget = true;
|
||||||
leftBorder = Pos.X - 10;
|
leftBorder = Pos.X - 10;
|
||||||
rightBorder = Pos.X + AppManager.Instance.GameManager.players[0].Pos.X;
|
rightBorder = Pos.X + AppManager.Instance.GameManager.players[0].Pos.X;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(!isGoRight && this._pos.X >= AppManager.Instance.GameManager.players[0].Pos.X)
|
else if (!isGoRight && this._pos.X >= AppManager.Instance.GameManager.players[0].Pos.X)
|
||||||
{
|
{
|
||||||
isTarget = true;
|
isTarget = true;
|
||||||
rightBorder = Pos.X + 10;
|
rightBorder = Pos.X + 10;
|
||||||
leftBorder = AppManager.Instance.GameManager.players[0].Pos.X;
|
leftBorder = AppManager.Instance.GameManager.players[0].Pos.X;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
=======
|
}
|
||||||
public override void Attack(GameTime gameTime)
|
public override void Attack(GameTime gameTime)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Target()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
>>>>>>> livingEntitiesVlad
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
using DangerousD.GameCore.GameObjects.LivingEntities;
|
|
||||||
using DangerousD.GameCore.GameObjects.MapObjects;
|
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using DangerousD.GameCore.GameObjects.LivingEntities.Monsters;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace DangerousD.GameCore.Levels
|
|
||||||
{
|
|
||||||
public class Level1 : ILevel
|
|
||||||
{
|
|
||||||
public void InitLevel()
|
|
||||||
{
|
|
||||||
new Player(new Vector2(80,0));
|
|
||||||
var Zombie = new Zombie(new Vector2(140, 128));
|
|
||||||
var Frank = new Frank(new Vector2(300, 0));
|
|
||||||
|
|
||||||
var Spider = new Spider(new Vector2(112, 0));
|
|
||||||
var FlameSkull = new FlameSkull(new Vector2(512, 0));
|
|
||||||
var Werewolf = new Werewolf(new Vector2(640, 0));
|
|
||||||
var Ghost = new Ghost(new Vector2(300, 0));
|
|
||||||
var FrankBalls = new FrankBalls(new Vector2(Frank.Pos.X, Frank.Pos.Y));
|
|
||||||
|
|
||||||
var SilasHand = new SilasHands(new Vector2(200,64));
|
|
||||||
var SilasMaster = new SilasMaster(new Vector2(400, 64));
|
|
||||||
new GrassBlock(new Vector2(0, 224));
|
|
||||||
for (int i = 0; i < 50; i++)
|
|
||||||
{
|
|
||||||
new GrassBlock(new Vector2(i*32, 256));
|
|
||||||
}
|
|
||||||
new GrassBlock(new Vector2(500, 224));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -178,7 +178,6 @@ namespace DangerousD.GameCore
|
||||||
{
|
{
|
||||||
foreach (NetworkTask networkTask in networkTasks)
|
foreach (NetworkTask networkTask in networkTasks)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
switch (networkTask.operation)
|
switch (networkTask.operation)
|
||||||
{
|
{
|
||||||
case NetworkTaskOperationEnum.TakeDamage:
|
case NetworkTaskOperationEnum.TakeDamage:
|
||||||
|
@ -199,25 +198,6 @@ namespace DangerousD.GameCore
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
case NetworkTaskOperationEnum.TakeDamage:
|
|
||||||
break;
|
|
||||||
case NetworkTaskOperationEnum.SendSound:
|
|
||||||
// SoundManager.StartSound(networkTask.name, networkTask.position, GameManager.GetPlayer1.Pos);
|
|
||||||
break;
|
|
||||||
case NetworkTaskOperationEnum.CreateEntity:
|
|
||||||
break;
|
|
||||||
case NetworkTaskOperationEnum.SendPosition:
|
|
||||||
break;
|
|
||||||
case NetworkTaskOperationEnum.ChangeState:
|
|
||||||
break;
|
|
||||||
case NetworkTaskOperationEnum.ConnectToHost:
|
|
||||||
break;
|
|
||||||
case NetworkTaskOperationEnum.GetClientPlayerId:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
>>>>>>> livingEntitiesVlad
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,7 @@ namespace DangerousD.GameCore
|
||||||
public Player GetPlayer1 { get; private set; }
|
public Player GetPlayer1 { get; private set; }
|
||||||
public GameManager()
|
public GameManager()
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
others = new List<GameObject>();
|
others = new List<GameObject>();
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> livingEntitiesVlad
|
|
||||||
GetAllGameObjects = new List<GameObject>();
|
GetAllGameObjects = new List<GameObject>();
|
||||||
livingEntities = new List<LivingEntity>();
|
livingEntities = new List<LivingEntity>();
|
||||||
mapObjects = new List<MapObject>();
|
mapObjects = new List<MapObject>();
|
||||||
|
@ -48,15 +44,8 @@ namespace DangerousD.GameCore
|
||||||
|
|
||||||
internal void Register(GameObject gameObject)
|
internal void Register(GameObject gameObject)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
|
|
||||||
GetAllGameObjects.Add(gameObject);
|
GetAllGameObjects.Add(gameObject);
|
||||||
if (gameObject is Player objPl)
|
if (gameObject is Player objPl)
|
||||||
=======
|
|
||||||
GetAllGameObjects.Add(gameObject);
|
|
||||||
if (gameObject is Player)
|
|
||||||
>>>>>>> livingEntitiesVlad
|
|
||||||
{
|
{
|
||||||
livingEntities.Add(gameObject as LivingEntity);
|
livingEntities.Add(gameObject as LivingEntity);
|
||||||
players.Add(objPl);
|
players.Add(objPl);
|
||||||
|
|
Loading…
Add table
Reference in a new issue