<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>toburau</author_name>
  <author_url>https://blog.hatena.ne.jp/toburau/</author_url>
  <blog_title>ゲームが作れるようになるまでがんばる日記</blog_title>
  <blog_url>https://toburau.hatenablog.jp/</blog_url>
  <categories>
    <anon>Daily</anon>
    <anon>Python</anon>
  </categories>
  <description>プレイヤーとエネミーの当たり判定を追加。 各キャラの当たり判定範囲を設定するために、まず矩形を描画する関数を実装。 つぎに各キャラの矩形を取得する関数を追加。 今回、キャラの画像はUnityでレンダリングして作ったとき、特に画像のサイズとキャラのサイズを合わせなかった。ということで当たり判定の矩形は見ながら調整した。 次に、矩形同士の当たり判定を座標の計算でやらなくてはと思っていたところ、 矩形として使っていたPygameのRectに重なりを判定する関数が実装されていたのに気付いた。 ということで、当たり判定はその関数を呼ぶだけで済んだ。 ゲーム用のライブラリなのだから、やっぱり当たり判定は実…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoburau.hatenablog.jp%2Fentry%2F2023%2F02%2F03%2F000000&quot; title=&quot;当たり判定 - ゲームが作れるようになるまでがんばる日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-02-03 00:00:00</published>
  <title>当たり判定</title>
  <type>rich</type>
  <url>https://toburau.hatenablog.jp/entry/2023/02/03/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
