//Aの部屋のドアAを押したとき public void PushDoorA() { //初めて開ける時 if (ProgressManager.Instance.openDoor == 0) { if (itemListManager.selectItem == Item.KeyA) { GetComponent <AudioSource>().PlayOneShot(keySe); Invoke("OpenDoor", 1); roomNo = 2; wallNo = 5; itemListManager.UseItem(Item.KeyA); itemListManager.SaveItem(); ProgressManager.Instance.openDoor = 1; ProgressManager.Instance.SaveProgress(); } else { GetComponent <AudioSource>().PlayOneShot(dontOpenDoorSE); } } else if (ProgressManager.Instance.openDoor == 1) { //2回め以降 walls.transform.localPosition = new Vector3(3000.0f, 2000.0f, 0.0f); GetComponent <AudioSource>().PlayOneShot(openDoorSE); roomNo = 2; wallNo = 5; } }
void GetKeyA() { itemListManager.SetItem(Item.KeyA); itemListManager.SaveItem(); backButton.interactable = true; ProgressManager.Instance.mark5 = 1; ProgressManager.Instance.SaveProgress(); }
void GetHint() { itemListManager.SetItem(Item.ClockHint); backButton.interactable = true; itemListManager.SaveItem(); ProgressManager.Instance.number5 = 1; ProgressManager.Instance.SaveProgress(); }