public GameScreen() { guiCam = new Camera2D(Assets.screenWidth, Assets.screenHeight); batcher = new spritebatchextension(Assets.max_texrg ); batcherBridge=new BatcherBridge(batcher); ts_bridge=new tools_seting_bridge(); //Sending a handle of this class to c++ Bridge.postobject(this, 0); //Sending a handle of this class to c++ Bridge.postobject(batcherBridge, 1); //Sending a handle of this class to c++ Bridge.postobject(guiCam, 2); ////////////////////////////////////// Bridge.postobject(ts_bridge,4); ///////////////////////////////// }
protected void LoadContent() { GrDev = base.GraphicsDevice; spriteBatch = new SpriteBatch(base.GraphicsDevice); spriteBatch1 = new SpriteBatch(base.GraphicsDevice); this.camera = new Camera2D(new Viewport(0, 0, (int)Assets.screenWidth, (int)Assets.screenHeight)); if (this.acel != null) { acel.ReportInterval = acel.MinimumReportInterval; acel.ReadingChanged += Aceloro; } if (this.orientationSensor != null) { Settings.orientation = this.orientationSensor.GetCurrentOrientation(); switch (Settings.orientation) { case SimpleOrientation.NotRotated: Settings.or = 1; break; case SimpleOrientation.Faceup: Settings.or = 1; break; case SimpleOrientation.Rotated180DegreesCounterclockwise: Settings.or = 2; break; case SimpleOrientation.Rotated270DegreesCounterclockwise:Settings.or = 3; break; case SimpleOrientation.Rotated90DegreesCounterclockwise:Settings.or = 4; break; } this.orientationSensor.OrientationChanged += OrientationChange; } }