Merge branch 'main' of https://github.com/progtime-net/DangerousD
This commit is contained in:
commit
6d9f0c21d5
9 changed files with 18 additions and 102 deletions
|
@ -80,7 +80,7 @@ namespace DangerousD.GameCore.GUI
|
|||
fontName = "font2"
|
||||
};
|
||||
hostButton.LeftButtonPressed += () => {
|
||||
|
||||
AppManager.Instance.ChangeGameState(GameState.Game);
|
||||
AppManager.Instance.NetworkManager.HostInit(AppManager.Instance.IpAddress);
|
||||
|
||||
};
|
||||
|
@ -106,6 +106,7 @@ namespace DangerousD.GameCore.GUI
|
|||
fontName = "font2"
|
||||
};
|
||||
joinSelectedButton.LeftButtonPressed += () => {
|
||||
AppManager.Instance.ChangeGameState(GameState.Game);
|
||||
AppManager.Instance.NetworkManager.ClientInit(AppManager.Instance.IpAddress);
|
||||
};
|
||||
Button joinByIpButton = new ButtonText(Manager)
|
||||
|
|
|
@ -12,23 +12,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
{
|
||||
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)
|
||||
{
|
||||
isGoRight = false;
|
||||
>>>>>>> livingEntitiesVlad
|
||||
|
||||
Width = 112;
|
||||
Height = 160;
|
||||
leftBoarder = 50;
|
||||
|
|
|
@ -37,7 +37,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
if(!isAttacking)
|
||||
{
|
||||
Move(gameTime);
|
||||
|
@ -45,12 +44,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
=======
|
||||
|
||||
base.Update(gameTime);
|
||||
}
|
||||
>>>>>>> livingEntitiesVlad
|
||||
public override void Attack()
|
||||
{
|
||||
collision = new Rectangle((int)position.X, (int)position.Y, 40, 40);
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
}
|
||||
currentTime++;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
private void SpawnAttackBall()
|
||||
{
|
||||
for (int i = 0; i < balls.Count; i++)
|
||||
|
@ -71,14 +71,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
|
||||
|
||||
}
|
||||
=======
|
||||
|
||||
public override void Attack(GameTime gameTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
>>>>>>> livingEntitiesVlad
|
||||
public override void Death()
|
||||
{
|
||||
|
||||
|
|
|
@ -50,8 +50,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
if (GraphicsComponent.GetCurrentAnimation != "SlimeReadyJumpLeftBottom")
|
||||
{
|
||||
GraphicsComponent.StartAnimation("SlimeReadyJumpLeftBottom");
|
||||
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
delay--;
|
||||
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);
|
||||
base.Draw(spriteBatch);
|
||||
}
|
||||
=======
|
||||
public override void Attack(GameTime gameTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
>>>>>>> livingEntitiesVlad
|
||||
public override void Death()
|
||||
{
|
||||
|
||||
|
@ -244,7 +235,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
|
||||
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 rightBorder;
|
||||
bool isAttaking = false;
|
||||
<<<<<<< HEAD
|
||||
bool isTarget = false;
|
||||
PhysicsManager physicsManager;
|
||||
=======
|
||||
|
||||
>>>>>>> livingEntitiesVlad
|
||||
public Zombie(Vector2 position) : base(position)
|
||||
{
|
||||
Width = 24;
|
||||
Height = 40;
|
||||
monster_speed = 1;
|
||||
monster_speed = 3;
|
||||
name = "Zombie";
|
||||
leftBorder = (int)position.X - 100;
|
||||
rightBorder = (int)position.X + 100;
|
||||
|
@ -115,36 +111,29 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
}
|
||||
base.OnCollision(gameObject);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public void Target()
|
||||
public override 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;
|
||||
leftBorder = Pos.X - 10;
|
||||
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;
|
||||
rightBorder = Pos.X + 10;
|
||||
leftBorder = AppManager.Instance.GameManager.players[0].Pos.X;
|
||||
}
|
||||
}
|
||||
=======
|
||||
}
|
||||
public override void Attack(GameTime gameTime)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
switch (networkTask.operation)
|
||||
{
|
||||
case NetworkTaskOperationEnum.TakeDamage:
|
||||
|
@ -199,9 +198,6 @@ namespace DangerousD.GameCore
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,11 +28,7 @@ namespace DangerousD.GameCore
|
|||
public Player GetPlayer1 { get; private set; }
|
||||
public GameManager()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
others = new List<GameObject>();
|
||||
=======
|
||||
|
||||
>>>>>>> livingEntitiesVlad
|
||||
GetAllGameObjects = new List<GameObject>();
|
||||
livingEntities = new List<LivingEntity>();
|
||||
mapObjects = new List<MapObject>();
|
||||
|
@ -48,15 +44,8 @@ namespace DangerousD.GameCore
|
|||
|
||||
internal void Register(GameObject gameObject)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
GetAllGameObjects.Add(gameObject);
|
||||
if (gameObject is Player objPl)
|
||||
=======
|
||||
GetAllGameObjects.Add(gameObject);
|
||||
if (gameObject is Player)
|
||||
>>>>>>> livingEntitiesVlad
|
||||
{
|
||||
livingEntities.Add(gameObject as LivingEntity);
|
||||
players.Add(objPl);
|
||||
|
|
Loading…
Add table
Reference in a new issue