/// <summary> 中心座標とサイズから描画します </summary> void draw(const Vec2 ¢er, const double width, const double height) { Vec2 min(center.x - width / 2, center.y - height / 2); Vec2 max(center.x + width / 2, center.y + height / 2); DrawExtendGraphF(min.x, min.y, max.x, max.y, handle, true); }
// 生きてるときの描画処理 void CPlayer::LiveDraw(){ if (m_state != State::LIVE)return; DrawExtendGraphF(m_pos.x(), m_pos.y(), m_pos.x()+m_size.x(), m_pos.y() + m_size.y(), CResource::player_graph, true); // 当たり判定テスト #ifdef Debug DrawBox(300, 400, 300+64, 400+64, GetColor(255, 0, 0), false); #endif }
/// <summary> 座標とサイズを指定して描画します </summary> void draw(const Vec2 &pos, const Size<double> &size) { DrawExtendGraphF(pos.x, pos.y, pos.x + size.width, pos.y + size.height, handle, true); }
void draw(const double x1, const double y1, const double x2, const double y2) { DrawExtendGraphF(static_cast<double>(x1), static_cast<double>(y1), static_cast<double>(x2), static_cast<double>(y2), handle, true); }