/// <summary> /// フェードインを実行するコルーチンを取得 /// </summary> /// <returns></returns> private IEnumerator FadeIn() { for (int i = 0; i < 360 || logicScene.alpha > 0.0f; i++) { this.logicScene.alpha = Mathf.MoveTowards(logicScene.alpha, 0f, fadeSpeed * Time.deltaTime); this.fadeImage.color = this.logicScene.fadeImageColor; yield return(null); if (logicScene.alpha < 0.1f) { StopCoroutine(fadeInCoroutine); if (scOprPlyer == null) { this.scOprPlyer = lgc.GetComponentScriptInGameObject <ScOperationPlayer>(CsNormalLevelDesignOfBall.GAMEOBJECTS_SP_BALL); } if (!ReferenceEquals(scOprPlyer, null) && scOprPlyer != null) { scOprPlyer.OparationEnableSwitch(); } if (scTimer == null) { this.scTimer = lgc.GetComponentScriptInGameObject <ScTimer>(CsNormalLevelDesignOfTimer.GAMEOBJECTS_TIMER); } if (!ReferenceEquals(scTimer, null) && scTimer != null) { scTimer.TimerEnableSwitch(); } } } }
// Start is called before the first frame update void Start() { this.scTimer = lgc.GetComponentScriptInGameObject <ScTimer>(CsNormalLevelDesignOfTimer.GAMEOBJECTS_TIMER); this.fadeInCoroutine = FadeIn(); this.fadeOutCoroutine = FadeOut(); this.fadeSpeed = 0.75f; StartCoroutine(fadeInCoroutine); SceneManager.sceneLoaded += FadeInStart; this.scOprPlyer = lgc.GetComponentScriptInGameObject <ScOperationPlayer>(CsNormalLevelDesignOfBall.GAMEOBJECTS_SP_BALL); }
// Start is called before the first frame update void Start() { this.scWrpScn = lgc.GetComponentScriptInGameObject <ScWarpScences>(CsNormalLevelDesignOfCommon.GAMEOBJECTS_MANAGE_OBJECT); this.scOprPlyer = lgc.GetComponentScriptInGameObject <ScOperationPlayer>(CsNormalLevelDesignOfBall.GAMEOBJECTS_SP_BALL); this.scTimer = lgc.GetComponentScriptInGameObject <ScTimer>(CsNormalLevelDesignOfTimer.GAMEOBJECTS_TIMER); }