Unityでジャンクゲームを作っているっぽい

会社帰りにGPD PocketにUnity入れてゲーム作ってます

2020-10-11から1日間の記事一覧

06 playerから弾の発射

playerに弾を発射する場所をつくる 空のオブジェクトを用意して、発射pointを作る 弾を発射するPlayer_Shot.csを作る using System.Collections; using System.Collections.Generic; using UnityEngine; public class Player_Shot : MonoBehaviour{ public G…

Pyxelで作る06 スコアとスコア表示

参考サイト 今回も↓のサイトにお世話になっています dev.classmethod.jp 今回追加したコード self.scoreという得点用の変数を作った初期化 playerとfruitの衝突判定内で、得点を加算 draw(self)内でUIとして表示 from random import randint import pyxel cl…

Pyxelで作る05 アイテムとの当たり判定

参考サイト 今回も↓のサイトにお世話になっています dev.classmethod.jp 今回追加したコード update_fruit内でplayerとの衝突判定をしています 衝突したら、fruitの表示を消しています def update_fruit(self, x, y, is_active): #衝突判定(playerとfruitの…