fix conflicts

This commit is contained in:
N4K 2023-08-18 05:46:37 +03:00
parent 8372369a48
commit 07412ddba1
17 changed files with 23 additions and 47 deletions

View file

@ -19,11 +19,7 @@ public abstract class AbstractGui : IDrawableObject
private GraphicsDevice graphicsDevice; private GraphicsDevice graphicsDevice;
public virtual void Initialize() public virtual void Initialize()
{ {
<<<<<<< HEAD
Manager.Initialize(AppManager.Instance.GraphicsDevice); Manager.Initialize(AppManager.Instance.GraphicsDevice);
=======
Manager.Initialize(AppManager.Instance.GraphicsDevice);
>>>>>>> ea55e2b4f2b2b9af627579f3c4b82bdf0171d80b
CreateUI(); CreateUI();
} }

View file

@ -18,6 +18,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
protected bool isAlive = true; protected bool isAlive = true;
protected int leftBoarder = 0; protected int leftBoarder = 0;
protected int rightBoarder = 800; protected int rightBoarder = 800;
protected bool isGoRight;
public CoreEnemy(Vector2 position) : base(position) public CoreEnemy(Vector2 position) : base(position)
{ {
@ -31,6 +32,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
public abstract void Death(); public abstract void Death();
public abstract void Attack(); public abstract void Attack();
public abstract void Attack(GameTime gameTime);
public abstract void Move(GameTime gameTime); public abstract void Move(GameTime gameTime);

View file

@ -12,7 +12,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{ {
public class FlameSkull : CoreEnemy public class FlameSkull : CoreEnemy
{ {
private bool isGoRight;
private bool isAttack; private bool isAttack;
public FlameSkull(Vector2 position) : base(position) public FlameSkull(Vector2 position) : base(position)
@ -74,6 +73,9 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
} }
public override void Attack(GameTime gameTime)
{
throw new NotImplementedException();
}
} }
} }

View file

@ -12,8 +12,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{ {
internal class Frank : CoreEnemy internal class Frank : CoreEnemy
{ {
private bool isGoRight;
public Frank(Vector2 position) : base(position) public Frank(Vector2 position) : base(position)
{ {
isGoRight = false; isGoRight = false;
@ -71,7 +69,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
} }
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ {
} }

View file

@ -80,13 +80,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
velocity.Y -= monster_speed; velocity.Y -= monster_speed;
} }
} }
public void Target()
public void Attack(GameTime gameTime)
{ {
throw new NotImplementedException();
} }
public void Target() public override void Attack(GameTime gameTime)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View file

@ -10,7 +10,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{ {
public class Ghost : CoreEnemy public class Ghost : CoreEnemy
{ {
private bool isGoRight;
private bool isAttack; private bool isAttack;
public Ghost(Vector2 position) : base(position) public Ghost(Vector2 position) : base(position)
@ -79,7 +78,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
} }
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ {
} }

View file

@ -81,7 +81,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
} }
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ {
} }

View file

@ -27,7 +27,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ {
} }

View file

@ -10,7 +10,8 @@ using System.Threading.Tasks;
namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{ {
public class SilasHands : CoreEnemy public class
SilasHands : CoreEnemy
{ {
public SilasHands(Vector2 position) : base(position) public SilasHands(Vector2 position) : base(position)
{ {
@ -30,9 +31,9 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ {
throw new NotImplementedException();
} }
public override void Death() public override void Death()

View file

@ -70,7 +70,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ {
} }

View file

@ -237,7 +237,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ {
} }

View file

@ -14,7 +14,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{ {
public class Spider : CoreEnemy public class Spider : CoreEnemy
{ {
private bool isGoRight;
private bool isAttack; private bool isAttack;
protected SpiderWeb web; protected SpiderWeb web;
@ -68,7 +67,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
/// Атака паука РАБОЧАЯ /// Атака паука РАБОЧАЯ
/// </summary> /// </summary>
/// <param name="gameTime"></param> /// <param name="gameTime"></param>
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ //48 72 { //48 72
velocity.X = 0; velocity.X = 0;
delay += (float)gameTime.ElapsedGameTime.TotalSeconds; delay += (float)gameTime.ElapsedGameTime.TotalSeconds;

View file

@ -28,7 +28,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ {
} }

View file

@ -12,7 +12,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{ {
public class Werewolf : CoreEnemy public class Werewolf : CoreEnemy
{ {
private bool isGoRight;
private bool isAttack; private bool isAttack;
public Werewolf(Vector2 position) : base(position) public Werewolf(Vector2 position) : base(position)
@ -73,7 +72,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
} }
public void Attack(GameTime gameTime) public override void Attack(GameTime gameTime)
{ {
} }

View file

@ -13,7 +13,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{ {
public class Zombie : CoreEnemy public class Zombie : CoreEnemy
{ {
private bool isGoRight;
private bool isAttack; private bool isAttack;
float leftBorder; float leftBorder;
@ -128,12 +127,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
} }
base.OnCollision(gameObject); base.OnCollision(gameObject);
} }
<<<<<<< HEAD
public override void Target()
=======
public void Target() public void Target()
>>>>>>> ea55e2b4f2b2b9af627579f3c4b82bdf0171d80b
{ {
if (AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - 50, (int)Pos.Y, Width + 100, Height), typeof(Player)).Count > 0) if (AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - 50, (int)Pos.Y, Width + 100, Height), typeof(Player)).Count > 0)
{ {
@ -163,11 +158,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
rightBorder = 760; rightBorder = 760;
} }
} }
public override void Attack(GameTime gameTime)
<<<<<<< HEAD
public override void Attack(GameTime gameTime) { }
=======
public void Attack(GameTime gameTime)
{} {}
public void TakeDamage() public void TakeDamage()
@ -180,6 +171,5 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
Death(); Death();
} }
} }
>>>>>>> ea55e2b4f2b2b9af627579f3c4b82bdf0171d80b
} }
} }

View file

@ -205,12 +205,8 @@ namespace DangerousD.GameCore
case GameState.Lobby: case GameState.Lobby:
break; break;
case GameState.Game: case GameState.Game:
<<<<<<< HEAD
GameManager.mapManager.LoadLevel("map");
=======
GameManager.mapManager.LoadLevel("lvl"); GameManager.mapManager.LoadLevel("lvl");
GameManager.FindBorders(); GameManager.FindBorders();
>>>>>>> main
break; break;
case GameState.Death: case GameState.Death:
break; break;

View file

@ -92,10 +92,6 @@ namespace DangerousD.GameCore.Managers
float offsetY = group.Attributes["offsety"] is not null ? float.Parse(group.Attributes["offsety"].Value) : 0; float offsetY = group.Attributes["offsety"] is not null ? float.Parse(group.Attributes["offsety"].Value) : 0;
foreach (XmlNode entity in group.ChildNodes) foreach (XmlNode entity in group.ChildNodes)
{ {
<<<<<<< HEAD
Type type = Type.GetType($"DangerousD.GameCore.GameObjects.{entityType}");
Entity inst = (Entity)Activator.CreateInstance(type, new Vector2(float.Parse(entity.Attributes["x"].Value, CultureInfo.InvariantCulture) + offsetX, float.Parse(entity.Attributes["y"].Value, CultureInfo.InvariantCulture) + offsetY ) * _scale);
=======
string entityType = entity.Attributes["type"] is not null ? "." + entity.Attributes["type"].Value : ""; string entityType = entity.Attributes["type"] is not null ? "." + entity.Attributes["type"].Value : "";
Type type = Type.GetType($"DangerousD.GameCore.GameObjects.{entityGroup}{entityType}"); Type type = Type.GetType($"DangerousD.GameCore.GameObjects.{entityGroup}{entityType}");
Vector2 pos = Vector2 pos =
@ -110,7 +106,6 @@ namespace DangerousD.GameCore.Managers
{ {
inst = (Entity)Activator.CreateInstance(type, pos); inst = (Entity)Activator.CreateInstance(type, pos);
} }
>>>>>>> ea55e2b4f2b2b9af627579f3c4b82bdf0171d80b
inst.SetPosition(new Vector2(inst.Pos.X, inst.Pos.Y - inst.Height)); inst.SetPosition(new Vector2(inst.Pos.X, inst.Pos.Y - inst.Height));
inst.Height *= _scale; inst.Height *= _scale;
inst.Width *= _scale; inst.Width *= _scale;