//fade를 이용하여 씬 변경 public void ChangeSceneOnFadeColor(int scene_idx, Color fade_color, float time) { this.next_scene_idx = scene_idx; this.fade_color = fade_color; this.fade_timepersec = 1.0f/time; this.scene_update = new SceneUpdate(ColorFadeIn); this.scene_gui = new SceneGUI(ColorFadeGUI); }
private static SceneUpdate GetObjectInfo() { var scene = new SceneUpdate(); scene.Ms = (long)RenderingHub.Instance.FrameRenderTime.Subtract(startedTime).TotalMilliseconds; scene.FrameNo = RenderingHub.Instance.FrameNo; scene.Objects = RenderingHub.Instance.GetObjects().ToList(); scene.Info = RenderingHub.Instance.GetInfos().ToList(); return(scene); }
public override void Update(float delta, float currentTime) { #if DEBUG //CollisionManager.World.DebugDrawWorld(); #endif SceneUpdate?.Invoke(this, new EventArgs( )); //Manager.Update( ); base.Update(delta, currentTime); }
private void ColorFadeIn() { this.fade_factor += Time.unscaledDeltaTime * this.fade_timepersec; if(this.fade_factor >= 1.0f) { if(this.loading_scene != null) { this.ChangeScene(loading_scene,this.next_scene_idx); this.loading_scene = null; } else { this.ChangeScene(this.next_scene_idx);} this.scene_update = new SceneUpdate(ColorFadeOut); this.fade_factor = 1.0f; } }
private void ColorFadeOut() { this.fade_factor -= Time.unscaledDeltaTime * this.fade_timepersec; if(this.fade_factor<=0.0f) { this.scene_update = null; this.scene_gui = null; this.fade_factor = 0.0f; } }
void OnEnable() { updater = (SceneUpdate)target; }