/************************************************** * User Defined Functions **************************************************/ /// <summary> /// 初期化処理 /// </summary> private async void Initialize() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } if (GameManager.playerProfile == null) { GameManager.playerProfile = SaveDataManager.GetClass("Player Profile", new PlayerProfile()); } if (GameManager.playerProfile.weapon == null) { if (InventoryManager.weapons.Count == 0) { GameManager.playerProfile.weapon = new Weapon(); InventoryManager.instance.AddItem(GameManager.playerProfile.weapon); } else { GameManager.playerProfile.weapon = InventoryManager.weapons[0]; } } InventoryManager.instance.SetEquippedWeapon(); UpdateProfile(); UpdateHighScore(); ChangeScreen(menuScreen); optionWindow.GetComponent <OptionWindowBehaviour>().Initialize(); tutorialWindow.GetComponent <TutorialWindowBehaviour>().Initialize(); overlay.SetActive(true); overlayAnimator.SetTrigger("FadeOut"); await Task.Delay(3000); overlay.SetActive(false); }