public RowanSeqStep(string text, Vector2 position, Scene scene, bool appearBadGuy = false, bool showtextscreen = true) : this() { scene.Camera.Zoom = 1f; _text = text; _position = position; _scene = scene; _appearBadGuy = appearBadGuy; _showtextscreen = showtextscreen; TimePerMessage = 0.5f; var theme = new Theme(scene.Pipeline.GetFont("font1", scene), scene.Pipeline.GetTexture("null"), Rectangle.Empty , scene.Pipeline.GetTexture("null"), Rectangle.Empty, scene.Pipeline.GetTexture("MessageWindow", scene), Rectangle.Empty); if (_gui == null) { _gui = new Gui(); } var formSize = scene.Pipeline.GetTexture("MessageWindow").Bounds.Size.ToVector2() * new Vector2(1.25f, 1.25f); _form = new Form(theme) { ForceEntireTexture = true, ForceSelection = true, IsMoveable = false, Size = formSize, Position = new Vector2(1080 / 2 - formSize.X / 2, 720 / 1.1f - formSize.Y) }; Label l = new Label(theme) { Text = text, MultiLine = true, CharacterCountPerLine = 64, LabelColor = Color.Black }; _form.AddControl("Label", l); l.Position = new Vector2(formSize.X / 2 - l.Size.X / 2, formSize.Y / 2 - l.Size.Y / 2); _gui.AddControl(text, _form); scene.Camera.ClampingEnabled = false; //scene.Camera.Zoom = 2.5f; _form.Hidden = true; // Need to put textures into Rowans content folder and redo theme init. // add multi line label to form etc... finish intro scene // add particle effects for bad guy appearance and disappearance // create levels, finish level changing make obstacles and create sound // preferably some swing music because I feel like that fits this game well // and game should be based in the 60's. Create timescale (just change the game time // value) for the ending scene, animate the kissing scene draw guy waking up in bed and // come to the realization its a dream, maybe make the time zone in the wake up scene modern // Finish commenting out engine and making code more readable. Where to go from here? }
public TextScreen(TmxObject e, Scene scene) : base(e, scene) { _scene = scene; pressedEnter = false; string text = e.Properties["Text"]; _text = text; GameObject a = new GameObject("LevelLoader", scene, new Vector2((int)e.X + (int)e.Width / 2, (int)e.Y + (int)e.Height / 2)); a.AddComponent("Collider", new RectangleCollider(0, 0, (int)e.Width, (int)e.Height, 0f)); a.Body.IsStatic = true; a.Body.IsSensor = true; a.Body.OnCollision += Body_OnCollision; a.Body.OnSeparation += Body_OnSeparation; playercolliders = new List <Fixture>(); if (_gui == null) { _gui = new Gui(); var theme = new Theme(scene.Pipeline.GetFont("font1", scene), scene.Pipeline.GetTexture("null"), Rectangle.Empty , scene.Pipeline.GetTexture("null"), Rectangle.Empty, scene.Pipeline.GetTexture("MessageWindow", scene), Rectangle.Empty); _form = new Form(theme); var formSize = scene.Pipeline.GetTexture("MessageWindow").Bounds.Size.ToVector2() * new Vector2(1.25f, 1.25f); _form = new Form(theme) { ForceEntireTexture = true, ForceSelection = true, IsMoveable = false, Size = formSize, Position = new Vector2(1080 / 2 - formSize.X / 2, 720 / 1.1f - formSize.Y) }; Label l = new Label(theme) { Text = text, MultiLine = true, CharacterCountPerLine = 64, LabelColor = Color.Black }; _form.AddControl("Label", l); l.Position = new Vector2(formSize.X / 2 - l.Size.X / 2, formSize.Y / 2 - l.Size.Y / 2); _gui.AddControl(text, _form); _form.Hidden = true; _form.IsMoveable = false; } }