public void StartClicked() { //debugText.text += "clicked "; if (!_kudanTracker.ArbiTrackIsTracking()) { Debug.Log("start clicked"); //debugText.text += "started tracking "; // from the floor placer. Vector3 floorPosition; // The current position in 3D space of the floor Quaternion floorOrientation; // The current orientation of the floor in 3D space, relative to the device _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); // Gets the position and orientation of the floor and assigns the referenced Vector3 and Quaternion those values _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation); // Starts markerless tracking based upon the given floor position and orientations spawnersPlaced++; gameContent.Init(); } else { //debugText.text += "already tracking "; } //else //{ // _kudanTracker.ArbiTrackStop(); //} }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); GameContent = new GameContent(GraphicsDevice); GameContent.Init(Content); }
private void LoadStuff() { GameContent.Init(Content, GraphicsDevice); //Work out how much we need to scale our graphics to fill the screen float horScaling = GraphicsDevice.PresentationParameters.BackBufferWidth / baseScreenSize.X; float verScaling = GraphicsDevice.PresentationParameters.BackBufferHeight / baseScreenSize.Y; Vector3 screenScalingFactor = new Vector3(horScaling, verScaling, 1); globalTransformation = Matrix.CreateScale(screenScalingFactor); virtualGamePad = new VirtualGamePad(baseScreenSize, globalTransformation, GameContent.Texture.VirtualControlArrow); MediaPlayer.IsRepeating = true; LoadNextLevel(); }