mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-28 16:43:29 +00:00
add set player
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
namespace BBM
|
||||
{
|
||||
LuaMap::LuaMap()
|
||||
: _map(17, std::vector<int>(17, 0)), _danger(17, std::vector<int>(17, 0))
|
||||
: _map(17, std::vector<int>(17, 0)), _danger(17, std::vector<int>(17, 0)),
|
||||
_player(), _roundedPlayer()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -39,6 +40,12 @@ namespace BBM
|
||||
return true;
|
||||
}
|
||||
|
||||
void LuaMap::setPlayer(Vector3f pos)
|
||||
{
|
||||
_player = Vector2f(pos.x, pos.y);
|
||||
_roundedPlayer = Vector2f(std::round(_player.x), std::round(_player.y));
|
||||
}
|
||||
|
||||
std::vector<Vector2f> LuaMap::fillPath(std::vector<Vector2f> &path,
|
||||
std::unordered_map<Vector2f, Vector2f> &cameFrom, Vector2f node) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user