#region Reference to system libraries using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Net; using Microsoft.Xna.Framework.Storage; #endregion // Label A: Reference to XNACS1Lib using XNACS1Lib; namespace XNACS1Lib_Start { /// Label B: Subclass from XNACS1Base public class Game1 : XNACS1Base { XNACS1Circle c1; // Label C: InitializeWorld() function protected override void InitializeWorld() { // 1. Set the coordinate system to work with World.SetWorldCoordinate(new Vector2(-1.0f, -1.0f), 15.0f); // 2. Set the background color World.SetBackgroundColor(Color.LightBlue); Vector2 pos = new Vector2(); // 3. Create 3 circles pos = (World.WorldMax + World.WorldMin) / 2.0f; XNACS1Circle center = new XNACS1Circle(pos, 1.0f); c1 = center; pos = new Vector2(0, 0); XNACS1Circle LowerLeft = new XNACS1Circle(pos, 1.0f); pos = World.WorldMax; XNACS1Circle UpperRight = new XNACS1Circle(pos, 1.0f); } // Label D: UpdateWorld() function protected override void UpdateWorld() { if (GamePad.ButtonBackClicked()) this.Exit(); c1.CenterX += GamePad.ThumbSticks.Right.X; EchoToTopStatus("Top Status: " + World.WorldMax); EchoToBottomStatus("Bottom Status: " + World.WorldMin); } } }