private void Update() { if (fade.IsFade) { return; } RenderSettings.skybox = skybox; if (!titleAnimationPlaying) { if (SwitchInput.GetButtonDown(0, nn.hid.NpadButton.A | nn.hid.NpadButton.B | nn.hid.NpadButton.X | nn.hid.NpadButton.Y | nn.hid.NpadButton.Up | nn.hid.NpadButton.Down | nn.hid.NpadButton.Right | nn.hid.NpadButton.Left)) { SeManager.GetInstance().Play(SeEnum.Decision); fade.StartFadeOut("CharacterSelectScene"); } } if (canSkip) { if (SwitchInput.GetButtonDown(0, SwitchButton.Pause)) { titleAnimator.SetTrigger("SkipTrigger"); } } }
/// <summary> /// 決定 /// </summary> void Decision(int playerId, PlayerType type) { SeManager.GetInstance().Play(SeEnum.Decision); animalArray[animalIndex[type]].GetComponent <BoxCollider>().enabled = false; animalArray[animalIndex[type]].transform.position = new Vector3( playerUI[playerId].capusuleTransform.position.x - 0.01f, playerUI[playerId].capusuleTransform.position.y - 0.15f, animalArray[animalIndex[type]].transform.position.z); playerUI[playerId].Decision(type); PlayerJoinManager.SetJoinInfo(playerId, true); PlayerTypeManager.SetPlayerType(playerId, type); }
void Update() { if (fade.IsFade) { return; } if (isTranslation) { return; } if (isPause) { if (SwitchInput.GetButtonDown(0, SwitchButton.Pause)) { SeManager.GetInstance().Play(SeEnum.Decision); StartCoroutine(ReturnGame()); } else { PauseItem nextItem = null; if (SwitchInput.GetButtonDown(0, SwitchButton.Ok)) { isPause = false; SeManager.GetInstance().Play(SeEnum.Decision); currentItem.transform.localScale = Vector3.Scale(defaultScale , new Vector3(1 + SizeRange, 1 + SizeRange, 1.0f)); currentItem.Execute(); } else if (SwitchInput.GetButtonDown(0, SwitchButton.SelectUp)) { nextItem = currentItem.up; } else if (SwitchInput.GetButtonDown(0, SwitchButton.SelectDown)) { nextItem = currentItem.down; } else if (SwitchInput.GetButtonDown(0, SwitchButton.SelectRight)) { nextItem = currentItem.right; } else if (SwitchInput.GetButtonDown(0, SwitchButton.SelectLeft)) { nextItem = currentItem.left; } if (nextItem != null) { currentItem.transform.localScale = defaultScale; currentItem = nextItem; timeCount = 0.0f; } float addScale = (Mathf.Sin(timeCount) + 1) / 2; float scale = 1 + addScale * SizeRange; currentItem.transform.localScale = Vector3.Scale(defaultScale , new Vector3(scale, scale, 1.0f)); timeCount += Time.unscaledDeltaTime * 2.0f; } } else { if (Time.timeScale == 0.0f) { return; } if (SwitchInput.GetButtonDown(0, SwitchButton.Pause)) { currentItem = pauseItems[0]; foreach (var pauseItem in pauseItems) { pauseItem.transform.localScale = defaultScale; } StartCoroutine(ToPause()); } } }