private void On_Destroy( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Sprite self = selfInstance as xgc3.Generated.Sprite; Console.WriteLine( "Spite - Destroy"); // TODO: Test Leak cleanup if (self.Texture != null) { self.Texture.Dispose(); self.Texture = null; } }
private void On_Draw( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Sprite self = selfInstance as xgc3.Generated.Sprite; //Console.WriteLine( "Sprite - Draw"); string resource = self.Resource; if (resource != null) { Vector2 p = new Vector2(self.X, self.Y); self.GameMgr.Game.GameComponent.SpriteB.Draw(self.Texture, p, Color.White); } else { // When no sprite? Just draw name. Vector2 p = new Vector2(self.X, self.Y); self.GameMgr.Game.GameComponent.SpriteB.DrawString(self.GameMgr.Game.FontMgr.Courier, self.Name, p, Color.Red); } }
private void On_Draw( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Label self = selfInstance as xgc3.Generated.Label; Vector2 p = new Vector2(self.X, self.Y); string text = self.Text; if( text == null) { text = self.Name; } self.GameMgr.Game.GameComponent.SpriteB.DrawString(self.GameMgr.Game.FontMgr.Courier, text, p, self.Color); }
private void On_Create( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Sprite self = selfInstance as xgc3.Generated.Sprite; Console.WriteLine( "Spite - Create"); string resource = self.Resource; if (resource != null) { Texture2D texturePointer = self.GameMgr.Game.Content.Load<Texture2D>(resource); self.Texture = texturePointer; } }
private new void On_Step( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Application_GameObjects.Room_Editor.Sprite_flower3 self = selfInstance as xgc3.Generated.Application_GameObjects.Room_Editor.Sprite_flower3; self.X = self.X+1; if( self.X > 200) { self.X = 0;} }
private void On_Step( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.FPS self = selfInstance as xgc3.Generated.FPS; xgc3.GameObjects.GameTimer gameTimer = other as xgc3.GameObjects.GameTimer; this.Text = string.Format( this.Format, Math.Round( gameTimer.FPS, 2)); }
private void On_Draw( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Button self = selfInstance as xgc3.Generated.Button; //Console.WriteLine( "Sprite - Draw"); if (self.Resource != null) { Vector2 p = new Vector2(self.X, self.Y); // Scale button graphic... DrawTiledTexture( self.GameMgr.Game.GameComponent.SpriteB, self.Resource.GetTexture( self.GameMgr), self.X, self.Y, self.Width, self.Height, Color.White, 5); // Now, draw the text inside the button. Rectangle textBounds; Rectangle r = new Rectangle( self.X, self.Y, self.Width, self.Height); DrawString( self.GameMgr.Game.GameComponent.SpriteB, self.GameMgr.Game.FontMgr.Courier, self.Text, r, Color.Black, TextAlignment.Middle, true, new Vector2(0,0), out textBounds); } else { // When no resource, Just draw name. Vector2 p = new Vector2(self.X, self.Y); self.GameMgr.Game.GameComponent.SpriteB.DrawString(self.GameMgr.Game.FontMgr.Courier, self.Name, p, Color.Red); } }
private void On_BarEvent( xgc3.Core.Instance self, xgc3.Core.Instance other, String extra) { Console.WriteLine( "Hello world!"); }
private void On_Create( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Button self = selfInstance as xgc3.Generated.Button; Console.WriteLine( "Sprite - Create"); this.Resource = normal; }
private void On_Destroy( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Button self = selfInstance as xgc3.Generated.Button; Console.WriteLine( "Sprite - Destroy"); // TODO - Free up resources? }
public void On_Click( xgc3.Core.Instance self, xgc3.Core.Instance other, String extra) { }
private new void On_Draw( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Application_GameObjects.Room_Editor.TextBox_TextBox1 self = selfInstance as xgc3.Generated.Application_GameObjects.Room_Editor.TextBox_TextBox1; Vector2 p = new Vector2(self.X, self.Y); self.GameMgr.Game.GameComponent.SpriteB.DrawString(self.GameMgr.Game.FontMgr.Courier, self.Text, p, self.Color); }
private new void On_Step( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Application_GameObjects.Room_Editor.TextBox_flower4 self = selfInstance as xgc3.Generated.Application_GameObjects.Room_Editor.TextBox_flower4; self.Y = self.Y+1; if( self.Y > 200) { self.Y = 0;} }
private void On_Create( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.TextBox self = selfInstance as xgc3.Generated.TextBox; Console.WriteLine( "Hello world!" + self.Name); }
private void On_LeftMouseUp( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Button self = selfInstance as xgc3.Generated.Button; this._msdown = false; this._callShow(); this.Raise_Click( this, null, null); }
private void On_Draw( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.TextBox self = selfInstance as xgc3.Generated.TextBox; Vector2 p = new Vector2(self.X, self.Y); self.GameMgr.Game.GameComponent.SpriteB.DrawString(self.GameMgr.Game.FontMgr.Courier, self.Text, p, self.Color); }
private void On_MouseOver( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Button self = selfInstance as xgc3.Generated.Button; this._msin = true; this._callShow(); }
private new void On_Create( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Application_GameObjects.Room_Editor self = selfInstance as xgc3.Generated.Application_GameObjects.Room_Editor; Console.WriteLine( "Hello world!"); }
private new void On_Click( xgc3.Core.Instance selfInstance, xgc3.Core.Instance other, String extra) { xgc3.Generated.Application_GameObjects.Room_Editor.Button_Button1 self = selfInstance as xgc3.Generated.Application_GameObjects.Room_Editor.Button_Button1; Console.WriteLine("Button click!"); }