Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
要素が別の要素に触れたときに要素を表示または非表示にしたい。
if (player.rectangle.isOnTopOf(object.rectangle)) { //Here I have to put the code }
isOnTopOf()長方形同士の衝突を検出する関数です。
isOnTopOf()