start work for hanchman
This commit is contained in:
parent
8d6e3e6ba7
commit
c1538670ba
1 changed files with 12 additions and 1 deletions
|
@ -38,7 +38,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
Target();
|
Target();
|
||||||
Move(gameTime);
|
Move(gameTime);
|
||||||
}
|
}
|
||||||
|
fixBorder();
|
||||||
base.Update(gameTime);
|
base.Update(gameTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,5 +130,16 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void fixBorder()
|
||||||
|
{
|
||||||
|
if(leftBorder <= 0)
|
||||||
|
{
|
||||||
|
leftBorder = 0;
|
||||||
|
}
|
||||||
|
if(rightBorder >= 800)
|
||||||
|
{
|
||||||
|
rightBorder = 760;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue