void OnClick() { // 「Stageserect」シーンに遷移する //SceneManager.LoadScene("Title"); SceneMovement.openWithBackGround("Title"); }
public override void Execute() { float nowTime = 0.0f; float sceneMoveTime = 3.0f; Debug.Log("Clear"); switch (clearSceneState) { case CLSCENESTATE.INITIALIZE: ref_gameManager.ClearUI.SetActive(true); clearSceneState = CLSCENESTATE.TERMINATED; break; case CLSCENESTATE.LOGO: if (nowTime >= sceneMoveTime) { clearSceneState = CLSCENESTATE.TERMINATED; } break; case CLSCENESTATE.TERMINATED: DataKeeper.score = ref_gameManager.score; //SceneManager.LoadScene(/*リザルトシーン*/); SceneMovement.openWithBackGround("Rizalute"); Debug.Log("Terminated"); break; } }
// Start is called before the first frame update void Start() { cookieCount = 0; sceneMover = (SceneMovement)FindObjectOfType(typeof(SceneMovement)); manager = (CreatureManagerScript)FindObjectOfType(typeof(CreatureManagerScript)); isCookieCharged = false; cookieReadyObj.SetActive(false); }
public void Update() { if (!Paused) { _time += Time.deltaTime; Relogio.text = $"{Mathf.FloorToInt(_time)}"; } if (sceneMovement != null) { float deltaTime = Time.deltaTime; sceneMovement.CurTime += deltaTime; Vector3 move = (deltaTime / sceneMovement.TotalTime) * sceneMovement.TotalMove; if (((sceneMovement.CurMove.x + move.x > sceneMovement.TotalMove.x) && (sceneMovement.TotalMove.x > 0)) || ((sceneMovement.CurMove.x + move.x < sceneMovement.TotalMove.x) && (sceneMovement.TotalMove.x < 0))) { move = sceneMovement.TotalMove - sceneMovement.CurMove; sceneMovement.CurMove = sceneMovement.TotalMove; } else { sceneMovement.CurMove += move; } sceneMovement.ScenesTransform.position = sceneMovement.ScenesTransform.position - move; if (sceneMovement.CurTime >= sceneMovement.TotalTime) { sceneMovement.NextScene.GetComponent <CanvasGroup>().interactable = true; if (sceneMovement.NextScene == Menu) { QuitButton.SetActive(true); } else if (sceneMovement.NextScene == Score) { BackButton2.SetActive(true); } else { BackButton.SetActive(true); } Hide(sceneMovement.CurrentScene); sceneMovement.NextScene.GetComponent <ISceneManager>()?.Ready(); sceneMovement = null; } } }
private void Fade(GameObject sceneToHide, GameObject sceneToShow, GameObject allScenes) { sceneMovement = new SceneMovement(sceneToHide, sceneToShow, allScenes); }
private void Awake() { Screen.SetResolution(768, 1024, false); //SceneManager.LoadScene("Title"); SceneMovement.openWithBackGround("Title"); }