public TugOfWarBackground() { backgroundTexture = Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Tug Of War Screen/TugOfWarScreen"); ropeTexture = Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Tug Of War Screen/Rope"); redBoxTexture = Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Tug Of War Screen/Red Box"); blueBoxTexture = Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Tug Of War Screen/Blue Box"); BackgroundObject_Oscillation rope = new BackgroundObject_Oscillation(Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Tug Of War Screen/Rope"), new Vector2(0, 474) * Game1.displayRatio, 4000d, 0d, 20f * Game1.displayRatio.X); backgroundObjects.Add(rope); backgroundObjects.Add(new BackgroundObject(Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Tug Of War Screen/Red Box"), new Vector2(275, 100) * Game1.displayRatio)); backgroundObjects.Add(new BackgroundObject(Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Tug Of War Screen/Blue Box"), new Vector2(1235, 100) * Game1.displayRatio)); }
float triangleSpacing = 15f * Game1.displayRatio.Y; //15 pixels of spacing between each triangle public MainMenuBackground() { //Load in fingers backgroundTexture = Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Title Screen/TitleScreen"); BackgroundObject_Oscillation redFinger = new BackgroundObject_Oscillation(Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Title Screen/Red Middle Finger"), new Vector2(250, 610) * Game1.displayRatio, true, 2000d, 0d, 5f * Game1.displayRatio.Y); BackgroundObject_Oscillation redFingerUpsideDown = new BackgroundObject_Oscillation(Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Title Screen/Red Middle Finger"), new Vector2(250, -30) * Game1.displayRatio, true, 2000d, 200d, 5f * Game1.displayRatio.Y); redFingerUpsideDown.spriteEffect = SpriteEffects.FlipVertically; BackgroundObject_Oscillation blueFinger = new BackgroundObject_Oscillation(Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Title Screen/Blue Middle Finger"), new Vector2(1200, 610) * Game1.displayRatio, true, 2000d, 600d, 5f * Game1.displayRatio.Y); BackgroundObject_Oscillation blueFingerUpsideDown = new BackgroundObject_Oscillation(Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Title Screen/Blue Middle Finger"), new Vector2(1200, -30) * Game1.displayRatio, true, 2000d, 1500d, 5f * Game1.displayRatio.Y); blueFingerUpsideDown.spriteEffect = SpriteEffects.FlipVertically; backgroundObjects.Add(redFinger); backgroundObjects.Add(redFingerUpsideDown); backgroundObjects.Add(blueFinger); backgroundObjects.Add(blueFingerUpsideDown); //Load in triangle triangle = Game1.GlobalContent.Load <Texture2D>(@"Background Screens/Title Screen/Triangle"); maxSpeed = 1000f * Game1.displayRatio.Y; rightAccel = 200 * Game1.displayRatio.Y; leftAccel = -200 * Game1.displayRatio.Y; }