2020-05-31から1日間の記事一覧

Unity 13日 後半 バトル終了後にボタンの再表示、敵のステータスの表示方法

<バトル終了後にボタンの再表示> A(バトルの管理) public class BattleManager : MonoBehaviour public QuestManager questManager; //Bを持つオブジェクトをインスペクターで貼り付け void EndBattle() { questManager.EndBattle(); //BのEndBattleを行…

13日目 前半 外部の関数の取得、敵の撃破(Destroy)

<Aのとき(クリックした時)にB の関数が呼ばれるようにするには> A public class EnemyManager : MonoBehaviour public void OnTap() { Debug.Log("クリックしました"); } B void PlayerAttack() { player.Attack(enemy); enemyUI.UpdateUI(enemy); } Aに…