Example #1
0
        /// <summary>
        /// 開始時初期化
        /// </summary>
        /// <returns></returns>
        async public override UniTask Enter(IBridgeLoopParam param)
        {
            // ボードのロード
            GameObject loadedObj = Instantiate(Resources.Load("Prefabs/Board/Board")) as GameObject;

            viewer = loadedObj != null?loadedObj.GetComponent <BoardViewer>() : null;

            Assert.IsTrue(viewer != null, "Boardとしての機能がない");
            loadedObj.SetParentToLocalInitialize(gameObject);

            // 1人用に初期化
            input = new KeyPlayInput();

            // ゲームスタート
            GameStart(input);
            await UniTask.Yield(PlayerLoopTiming.Update, cancellationToken : this.GetCancellationTokenOnDestroy());
        }
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="viewer"></param>
 public PlayerInfo(BoardViewer viewer)
 {
     Viewer = viewer;
 }