/// <summary> /// Initialize scene objects. /// </summary> protected override void InitializeDeviceObjects() { drawingFont.InitializeDeviceObjects(device); spaceSphere = new PositionedMesh(device, "SpaceSphere.x"); HullColors hullColor = HullColors.White; playerShip = new Ship(device, this, hullColor); if (playerShip.HostName == null) { playerShip.HostName = "Player"; } playerShip.State = ShipState.Normal; HullColors opponentHullColor; if (hullColor == HullColors.Red) { opponentHullColor = HullColors.White; } else { opponentHullColor = HullColors.Red; } opponentShip = new Ship(device, this, opponentHullColor); if (opponentShip.HostName == null) { opponentShip.HostName = "Opponent"; } opponentShip.State = ShipState.Normal; bgPointer = new BGPointer(device); vectorPanel = TextureLoader.FromFile(device, MediaUtilities.FindFile("vectorPanel.png")); rts = new RenderToSurface(device, 128, 128, Format.X8R8G8B8, true, DepthFormat.D16); }
/// <summary> /// Initialize scene objects. /// </summary> protected override void InitializeDeviceObjects() { drawingFont.InitializeDeviceObjects(device); spaceSphere = new PositionedMesh(device, "SpaceSphere.x"); playerShip = new Ship(device, this, hullColor); if (playerShip.HostName == null) playerShip.HostName = "Player"; playerShip.State = ShipState.Normal; HullColors opponentHullColor; if (hullColor == HullColors.Red) opponentHullColor = HullColors.White; else opponentHullColor = HullColors.Red; opponentShip = new Ship(device, this, opponentHullColor); if (opponentShip.HostName == null) opponentShip.HostName = "Opponent"; opponentShip.State = ShipState.Normal; bgPointer = new BGPointer(device); vectorPanel = TextureLoader.FromFile(device, MediaUtilities.FindFile("vectorPanel.png")); rts = new RenderToSurface(device, 128, 128, Format.X8R8G8B8, true, DepthFormat.D16); }