public MessageWindow(Scene parent, Vector2 Position, string Message, MessageConfirmType destroyType) : base(parent, Position) { this.destroyType = destroyType; base.Text = Message; e = new MessageWindowEventArgs(Message, destroyType); Initialize(); }
public TextArea(Scene parent, int Width, int Height, OnOvertaking overBehaviour) : base(parent) { Lines = new List<int>(); Rows = new List<List<int>>(); TextContent = new List<List<Text>>(); Size = new Vector2(Width, Height); this.overBehaviour = overBehaviour; }
public Scene(Scene parent) : base(parent.Game) { Content = parent.Content; this.parent = parent; this.Enabled = parent.Enabled; this.Visible = parent.Visible; this.DrawOrder = parent != null ? parent.DrawOrder + 1 : 0; this.parent.Add(this); }
public Sprite(Scene parent, List<string> assetNames) : base(parent) { for (int i = 0; i < assetNames.Count; i++) { AnimationID.Add(assetNames[i], i); } SpriteSheet = new Texture2D[assetNames.Count]; InitContent(); }
public Interpretable GetInterpretable(string interpretableName, Scene parent) { Type type = assembly.GetType (interpretableName); if (type == null) { throw new Exception (String.Format ("Cannot find type {0} in interpreter {1}.", interpretableName, this.name)); } object[] args = new object[1] {parent}; return Activator.CreateInstance (type, args) as Interpretable; }
/// <summary> /// unpause the game, then fire the Unpaused event. /// </summary> public void UnPause(Scene sender, EventArgs e) { paused = false; if (UnPaused != null) UnPaused(sender, e); foreach (Scene subScene in subScenes) subScene.UnPause(this, e); }
/// <summary> /// Toogle the paused state of the scene. /// </summary> public void TooglePause(Scene sender, EventArgs e) { if (paused) UnPause(sender, e); else Pause(sender, e); }
public void Remove(Scene item) { subScenes.Remove(item); Game.Components.Remove(item); }
/// <summary> /// Pause the game, then fire the Paused event. /// </summary> public void Pause(Scene sender, EventArgs e) { paused = true; if (Paused != null) Paused(sender, e); foreach (Scene subScene in subScenes) subScene.Pause(this, e); }
public void RemoveTarget(Scene target) { try { int i = subScenes.IndexOf(target); if (targets.Contains(i)) targets.Remove(i); } catch { throw new Exception("The requested target is not attached to the camera!"); } }
public Sprite(Scene parent, List<Texture2D> assets, Effect effect) : base(parent) { int i = 0; SpriteSheet = new Texture2D[assets.Count]; foreach (Texture2D asset in assets) { AnimationID.Add(asset.Name,i); SpriteSheet[i] = asset; i++; } afterImageEffect = effect; }
public Text(Scene parent, string spriteFontName) : base(parent) { this.spriteFontName = spriteFontName; }
public MyInterpretable(Scene parent) : base(parent) { sc = new SayCommand(parent, "Coucou, tu veux voir ma ville ?"); sca = new SayCommand(parent, "Non merci."); }
public Window(Scene parent, Rectangle rect) : base(parent) { WindowRectangle = rect; Position = new Vector2(rect.X, rect.Y); }
public Camera(Scene parent, Vector2 position) : base(parent) { this.Position = position; ZoomOrigin = new Vector2(parent.Game.GraphicsDevice.Viewport.Width / 2, parent.Game.GraphicsDevice.Viewport.Height / 2); }
public Command(Scene parent) : base(parent) { }
public Interpretable(Scene parent) : base(parent) { }
public void Add(Scene item) { item.Enabled = this.Enabled; item.Visible = this.Visible; subScenes.Add(item); //Game.Components.Add(item); }
public MenuWindow(Scene parent, Vector2 Position,string Text) : base(parent, Position) { this.Text = Text; Initialize(); }
public Bar(Scene parent, Vector2 Size) : base(parent) { this.Size = Size; }