/// <summary> /// メニューの表示・非表示を切り替える /// </summary> public void ToggleMenu() { if (isFreeze) { return; } //音の再生 AudioManager.Play(SEType.Button, 1); Debug.Log("(/・ω・)/"); bool isOpen = !animator.GetBool("Open"); animator.SetBool("Open", isOpen); if (isOpen) { //マスクのIDを設定 int bgmID = Tentacle.GetNextMaskID(); bgmTentacleInstance.sharedMaterial = ResourceLoader.GetMaterial(R_MaterialType.MaskableSprite); bgmTentacleInstance.sharedMaterial.SetInt("_ID", bgmID); bgmMaskRenderer.material = ResourceLoader.GetMaterial(R_MaterialType.MaskingSprite); bgmMaskRenderer.material.SetInt("_ID", bgmID); int seID = Tentacle.GetNextMaskID(); seTentacleInstance.sharedMaterial = ResourceLoader.GetMaterial(R_MaterialType.MaskableSprite); seTentacleInstance.sharedMaterial.SetInt("_ID", seID); seMaskRenderer.material = ResourceLoader.GetMaterial(R_MaterialType.MaskingSprite); seMaskRenderer.material.SetInt("_ID", seID); Debug.Log("set"); } }