-
-
Save todorok1/be70f7c4fe1ecd5da4293e96ada8ad23 to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第41回 戦闘関連のウィンドウ全体を管理するクラス
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace SimpleRpg | |
| { | |
| /// <summary> | |
| /// 戦闘関連のウィンドウ全体を管理するクラスです。 | |
| /// </summary> | |
| public class BattleWindowManager : MonoBehaviour | |
| { | |
| /// <summary> | |
| /// ステータス表示のウィンドウを制御するクラスへの参照です。 | |
| /// </summary> | |
| [SerializeField] | |
| StatusWindowController _statusWindowController; | |
| /// <summary> | |
| /// ウィンドウのコントローラのリストです。 | |
| /// </summary> | |
| List<IBattleWindowController> _battleWindowControllers = new(); | |
| void Start() | |
| { | |
| SetControllerList(); | |
| } | |
| /// <summary> | |
| /// UIコントローラのリストをセットアップします。 | |
| /// </summary> | |
| public void SetControllerList() | |
| { | |
| _battleWindowControllers = new() | |
| { | |
| _statusWindowController, | |
| }; | |
| } | |
| /// <summary> | |
| /// 各ウィンドウのコントローラをセットアップします。 | |
| /// </summary> | |
| /// <param name="battleManager">戦闘に関する機能を管理するクラス</param> | |
| public void SetUpWindowControllers(BattleManager battleManager) | |
| { | |
| foreach (var controller in _battleWindowControllers) | |
| { | |
| controller.SetUpController(battleManager); | |
| } | |
| } | |
| /// <summary> | |
| /// 各UIを非表示にします。 | |
| /// </summary> | |
| public void HideAllWindow() | |
| { | |
| foreach (var controller in _battleWindowControllers) | |
| { | |
| controller.HideWindow(); | |
| } | |
| } | |
| /// <summary> | |
| /// ステータス表示のウィンドウを制御するクラスへの参照を取得します。 | |
| /// </summary> | |
| public StatusWindowController GetStatusWindowController() | |
| { | |
| return _statusWindowController; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment