/// <summary> /// Draws all of the IDrawItems that are to be drawn. /// </summary> public void Render() { if (layers.Layers > 0) { if (LightingManager.LightCount > 0 && CameraManager.CurrentCamera != null) { Draw(DrawingStage.Colour); Draw(DrawingStage.Normal); Draw(DrawingStage.Distortion); lighting.SetTargets(render.Texture, opaqueRender.Texture); lighting.Draw(); final = lighting.Final; } else { Draw(DrawingStage.Colour); final = render.Texture; } } else { final = black; } EngineComponent comp = EngineComponentManager.Find("D2RenderFramework"); if (comp != null) { comp.SendMessage("SetPostProcessing", new object[] { final, opaqueRender.Texture, distortionRender.Texture }); } }
internal void Initialize() { AnimaticManager am = (AnimaticManager)EngineComponentManager.Find("AnimaticManager"); if (am != null) { AnimaticStream stream = am.GetStream(streamNumber); actions = stream.GetActions(actionIDs); } for (int i = 0; i < actions.Count; i++) { actions[i].OnComplete = null; actions[i].OnComplete += new FinishedActionEvent(Complete); } }
protected virtual void _LevelTransitionOn(string levelID) { EngineComponent comp = EngineComponentManager.Find("Camera2DManager"); if (comp == null) { comp = EngineComponentManager.Find("Camera3DManager"); if (comp != null) { comp.SendMessage("LockToGameObject", position); } } else { comp.SendMessage("LockToGameObject", position, size); } }
/// <summary> /// Creates a new Animatic. /// </summary> /// <param name="filepath">The filepath of the Animatic.</param> public Animatic(string filepath) { AnimaticInfo info = XmlHelper.Deserialize <AnimaticInfo>(filepath, ".Animatic", true); activeState = info.ActiveInState; for (int i = 0; i < info.Streams.Length; i++) { AnimaticStream stream = new AnimaticStream(info.Streams[i], i); stream.OnEnd += new EndOfStreamEvent(OnEnd); streams.Add(stream); } AnimaticManager am = (AnimaticManager)EngineComponentManager.Find("AnimaticManager"); if (am != null) { am.Add(this); } }
/// <summary> /// Creates a new Animatic. /// </summary> /// <param name="filepath">The filepath of the Animatic.</param> public Animatic(string filepath) { AnimaticInfo info = Common.ContentManager.Load <AnimaticInfo>(filepath); activeState = info.ActiveInState; for (int i = 0; i < info.Streams.Count; i++) { AnimaticStream stream = new AnimaticStream(info.Streams[i], i); stream.OnEnd += new EndOfStreamEvent(OnEnd); streams.Add(stream); } AnimaticManager am = (AnimaticManager)EngineComponentManager.Find("AnimaticManager"); if (am != null) { am.Add(this); } }