Beispiel #1
0
 //Summary
 //	Class for creating an on-screen Button
 public Button(string a_buttonTexture, Vector2 a_screenPosition)
     : base(a_screenPosition)
 {
     m_buttonTexture = a_buttonTexture;
     LuaParser.registerMethod("updateButton", this, "update");
     LuaParser.registerMethod("drawButton", this, "draw");
 }
Beispiel #2
0
 protected override void LoadContent()
 {
     m_camera = new Camera(Vector2.Zero);
     m_camera.load();
     m_camera.p_zoom = Game.getInstance().getResolution().Y / 720;
     m_spriteBatch   = new SpriteBatch(GraphicsDevice);
     LuaParser.registerMethod("getXRes", this, "getXRes");
     LuaParser.registerMethod("getYRes", this, "getYRes");
     m_currentState.load();
 }