Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LoadDragon0000000000/c7959c905edf22c622bfa2ba7eb17b57 to your computer and use it in GitHub Desktop.
Save LoadDragon0000000000/c7959c905edf22c622bfa2ba7eb17b57 to your computer and use it in GitHub Desktop.
// 壁の描画
void ClassStage::DrawWallandCookie() {
for (int Heigth = 0; Heigth < 15; ++Heigth) {
for (int Width = 0; Width < 15; ++Width) {
// 壁の描画
if (Map[Heigth][Width].GetAttribute() == enumWall) {
Sprite_Wall.Draw((float)Heigth * HEIGTH, (float)Width * WIDTH, false, 255, 255, 255, 255);
}
}
}
}
// プレイヤーの進行方向が進めるかをチェックする p:PlayerAorB
bool ClassStage::NextBlockCheck(ClassObject* o, int h, int w) {
if (Map[o->GetMapH() + h][o->GetMapW() + w].GetAttribute() == enumRoad) // なにもない
return true;
if (Map[o->GetMapH() + h][o->GetMapW() + w].GetAttribute() == enumCookie) // クッキー
return true;
if (Map[o->GetMapH() + h][o->GetMapW() + w].GetAttribute() == enumPowerCookie) // パワークッキー
return true;
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment