public WorldEditor() { cullMode = true; objects = new List<LevelObject>(); objects.Add(new LevelRectangle(300, 10, 100, 100)); draggingColor = 0; r = new GameRectangle(-15, -15, 15, 15); g = new GameRectangle(-15, -15, 15, 15); b = new GameRectangle(-15, -15, 15, 15); tool = new AnimationTool(); objects[0].SetColor(Color.White); ((LevelRectangle)objects[0]).SetBorderColor(Color.Black); objects.Add(new LightLevelCircle(400, 100, 200)); objects[1].SetColor(Color.White); textBox = new FileTextBox(); textBox.SetX(400); textBox.SetY(100); }
/// <summary> /// This shifts a vector based on height and such, so that the x coordinates make more sense from /// the bottom of the screen, rather than the top. /// </summary> /// <param name="gO">The Game Object to be Drawn.</param> /// <returns>An Adjusted Vector</returns> public static Vector2 ShiftVector(GameObject gO, int windowHeight) { Vector2 vec = new Vector2(gO.GetX(), gO.GetY()); vec.Y += -gO.GetHeight() + windowHeight; return vec; }