コード例 #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
コード例 #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #3
0
    // Start is called before the first frame update
    void Start()
    {
        playerUI.transform.localPosition = new Vector3(-300, -300, 0);

        PlayerUI.SetupUI(Player);

        // ダイアログが非表示になっていたら表示させておく.
        fadeManager = GameObject.Find("FadeCanvas").GetComponent <FadeIOManager>();
        fadeManager.dialogWindow.SetActive(true);
        dialogCanvas = fadeManager.dialogWindow.GetComponent <CanvasGroup>();
        dialogCanvas.ignoreParentGroups = true;

        DialogTextManager.instance.SetScenarios(new string[] { "町についた" });
    }