Beispiel #1
0
    /// <summary>
    /// 探索開始
    /// </summary>
    /// <param name="playerPos"></param>
    /// <param name="playerController"></param>
    public void OpenTresureBox(Vector3 playerPos, PlayerController playerController)
    {
        if (this.playerController == null)
        {
            this.playerController = playerController;
        }

        SwitchStateTreasureBox(true);

        if (playerPos.y < transform.position.y) // プレイヤーの位置が宝箱より下の場合
        {
            dialogController.transform.position = offsetPos;
        }
        else
        {
            dialogController.transform.position = defaultPos;
        }

        // 設定されている会話ウインドウの種類に合わせて、開く会話ウインドウを分岐させる
        if (isFixedTalkWindowUsing)
        {
            uiManager.OpenSearchWindow(eventData, this); // 固定型の会話ウインドウを表示する
        }
        else
        {
            StartCoroutine(dialogController.DisplaySearchDialog(eventData, this)); // 稼働型の会話イベントのウインドウを表示する
        }

        // 探索イベント用の会話ウィンドウを開く
        // dialogController.DisplaySearchDialog(eventData, this);
        // StartCoroutine(dialogController.DisplaySearchDialog(eventData, this));
    }
Beispiel #2
0
 public void OpenSearchWindow(EventData eventData, TreasureBox treasureBox)
 {
     StartCoroutine(dialogController.DisplaySearchDialog(eventData, treasureBox));
 }