FrankB
This commit is contained in:
parent
695a8fb871
commit
8e464223de
1 changed files with 13 additions and 3 deletions
|
@ -29,7 +29,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
name = "FrankBalls";
|
name = "FrankBalls";
|
||||||
Width = 40;
|
Width = 40;
|
||||||
Height = 40;
|
Height = 40;
|
||||||
monster_speed = 3;
|
monster_speed = 2;
|
||||||
acceleration = Vector2.Zero;
|
acceleration = Vector2.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,17 +37,27 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
|
|
||||||
public override void Update(GameTime gameTime)
|
public override void Update(GameTime gameTime)
|
||||||
{
|
{
|
||||||
if(!isAttacking)
|
collision = new Rectangle((int)position.X, (int)position.Y, 40, 40);
|
||||||
|
|
||||||
|
if (!isAttacking)
|
||||||
{
|
{
|
||||||
Move(gameTime);
|
Move(gameTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(GraphicsComponent.GetCurrentAnimation == "FrankMoveRight")
|
||||||
|
{
|
||||||
|
isFlyRight = true;
|
||||||
|
}
|
||||||
|
else if(GraphicsComponent.GetCurrentAnimation == "FrankMoveLeft")
|
||||||
|
{
|
||||||
|
isFlyRight = false;
|
||||||
|
}
|
||||||
|
|
||||||
base.Update(gameTime);
|
base.Update(gameTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Attack()
|
public override void Attack()
|
||||||
{
|
{
|
||||||
collision = new Rectangle((int)position.X, (int)position.Y, 40, 40);
|
|
||||||
isAttacking = true;
|
isAttacking = true;
|
||||||
|
|
||||||
if(isFlyRight)
|
if(isFlyRight)
|
||||||
|
|
Loading…
Add table
Reference in a new issue