mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 22:41:48 +01:00
Add window icon,
Add digging animation (Non functional)
This commit is contained in:
@@ -79,12 +79,12 @@ void WorldLevel::Update(float elapsedSec) {
|
||||
m_mousePos = Vector2f { float(mouseX), float(mouseY) };
|
||||
m_mousePos = m_pCamera->TransformMouse(m_mousePos);
|
||||
|
||||
|
||||
for (size_t x { 0 }; x < WORLD_WIDTH; ++x) {
|
||||
for (size_t y { 0 }; y < WORLD_HEIGHT; ++y) {
|
||||
m_gridManager.GetTileAtIndex(x, y)->m_Hightlight = false;
|
||||
}
|
||||
}
|
||||
// for (size_t x { 0 }; x < WORLD_WIDTH; ++x) {
|
||||
// for (size_t y { 0 }; y < WORLD_HEIGHT; ++y) {
|
||||
// m_gridManager.GetTileAtIndex(x, y)->m_Hightlight = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
for (size_t x { 0 }; x < WORLD_WIDTH; ++x) {
|
||||
for (size_t y { 0 }; y < WORLD_HEIGHT; ++y) {
|
||||
m_gridManager.GetTileAtIndex(x, y)->Update(m_pCamera);
|
||||
@@ -101,21 +101,21 @@ void WorldLevel::Update(float elapsedSec) {
|
||||
}
|
||||
|
||||
//Get the diogonal tiles of the selected tile
|
||||
if (m_pSelectedTile != nullptr) {
|
||||
surroundingTiles surroundingTiles = m_gridManager.GetSurroundingTiles(m_pSelectedTile);
|
||||
TileDirection direction = TileDirection::TopMiddle;
|
||||
const std::array<TileDirection, 8> directions = { TileDirection::TopLeft, TileDirection::TopMiddle, TileDirection::TopRight, TileDirection::MiddleLeft,
|
||||
TileDirection::MiddleRight, TileDirection::BottomLeft, TileDirection::BottomMiddle, TileDirection::BottomRight };
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
direction = directions[i];
|
||||
if (surroundingTiles.GetTile(direction) != nullptr) {
|
||||
if (surroundingTiles.GetTile(direction)->GetTileType() != GroundTileTypeManager::GetInstance()->AIR) {
|
||||
//surroundingTiles.GetTile(direction)->m_Hightlight = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (m_pSelectedTile != nullptr) {
|
||||
// surroundingTiles surroundingTiles = m_gridManager.GetSurroundingTiles(m_pSelectedTile);
|
||||
// TileDirection direction = TileDirection::TopMiddle;
|
||||
// const std::array<TileDirection, 8> directions = { TileDirection::TopLeft, TileDirection::TopMiddle, TileDirection::TopRight, TileDirection::MiddleLeft,
|
||||
// TileDirection::MiddleRight, TileDirection::BottomLeft, TileDirection::BottomMiddle, TileDirection::BottomRight };
|
||||
//
|
||||
// for (int i = 0; i < 8; i++) {
|
||||
// direction = directions[i];
|
||||
// if (surroundingTiles.GetTile(direction) != nullptr) {
|
||||
// if (surroundingTiles.GetTile(direction)->GetTileType() != GroundTileTypeManager::GetInstance()->AIR) {
|
||||
// //surroundingTiles.GetTile(direction)->m_Hightlight = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
m_player.Update(elapsedSec, *this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user