/// <summary> /// Loads all the shared and start/title/pause screen stuff. /// </summary> public static void LoadShared() { // Box art Textures TextureStatic.Load("BoxArtGame1", @"Shared\BoxArt\BoxArtGame1"); TextureStatic.Load("BoxArtGame2", @"Shared\BoxArt\BoxArtGame2"); TextureStatic.Load("BoxArtGame3", @"Shared\BoxArt\BoxArtGame3"); TextureStatic.Load("BoxArtGame4", @"Shared\BoxArt\BoxArtGame4"); TextureStatic.Load("BoxArtGame5", @"Shared\BoxArt\BoxArtGame5"); TextureStatic.Load("BoxArtHolder", @"Shared\BoxArt\BoxArtHolder"); // Other Shared Textures TextureStatic.Load("TitleNameBorder", @"Shared\Art\titleNameBorder"); TextureStatic.Load("Blank", @"Shared\Art\Blank"); TextureStatic.Load("tileSafeCheck", @"Shared\Art\tileSafeCheck"); TextureStatic.Load("particle1", @"DefaultBackground\particle1"); TextureStatic.Load("checkers", @"DefaultBackground\checkers"); TextureStatic.Load("colorSwirl", @"DefaultBackground\colorSwirl"); TextureStatic.Load("sampleInstructions", @"Shared\Art\sampleInstructions"); TextureStatic.Load("instructionBorder", @"Shared\Art\instructionBorder"); TextureStatic.Load("gradient", @"Shared\Art\Gradient"); // Audio GameWorld.audio.LoadSound("boxArtScroll", @"Shared\Sounds\boxArtScroll"); GameWorld.audio.LoadSound("menuClick", @"Shared\Sounds\menuClick"); GameWorld.audio.LoadSound("menuGoBack", @"Shared\Sounds\menuGoBack"); GameWorld.audio.LoadSound("menuScrollDown", @"Shared\Sounds\menuScrollDown"); GameWorld.audio.LoadSound("menuScrollUp", @"Shared\Sounds\menuScrollUp"); GameWorld.audio.LoadSound("volumeControlDown", @"Shared\Sounds\volumeControlDown"); GameWorld.audio.LoadSound("volumeControlUp", @"Shared\Sounds\volumeControlUp"); // Fonts FontStatic.Load("defaultFont", @"Shared\Fonts\defaultFont"); FontStatic.Load("controllerFont", @"Shared\Fonts\controllerFont"); }
public BasketballScene() { reset = false; Song bgm = Cloud.content.Load <Song>("Thats a Wrap"); MediaPlayer.Play(bgm); MediaPlayer.IsRepeating = true; sw.Start(); renderables = new RenderableCollection(); Physics.collisions = new CollisionHandler(renderables); toAdd = new List <Renderable>(); toRemove = new List <Renderable>(); Ball = new ball(new Vector2(120, 150), this); renderables.Add(Ball); TextureStatic.Load("hoopA", @"Art"); TextureStatic.Load("hoopB", @"Art"); TextureStatic.Load("courtBG", @"Art"); TextureStatic.Load("net", @"Art"); TextureStatic.Load("net2", @"Art"); //courtbg = new Background("court", @"Art\Backgrounds", new Vector2(-360, 110), new Vector2(-10, 0), 0.11f, true, this); //renderables.Add(courtbg); //tentacle tn = new tentacle(new Vector2(0, 0), this); //renderables.Add(tn); }
public Background(String asset, String directory, Vector2 pos, Vector2 vel, float dep, bool wr, Object par) { TextureStatic.Load(asset, directory); content = asset; position = pos; velocity = vel; parent = par; depth = dep; wrap = wr; width = TextureStatic.Get(asset).Width; halfwidth = width / 2; }
// returns the set of bones used for the tentacle (sort of like a model) public static BoneSet GetBoneSet() { /* TODO: Complete this set */ BoneSet b = new BoneSet(); // Bone(Parent, Offset, Origin, Length, Width, Texture, Depth, [angle, color, alpha]) TextureStatic.Load("fArm", @"Art/body"); TextureStatic.Load("head1", @"Art/body"); TextureStatic.Load("lArm", @"Art/body"); TextureStatic.Load("lHand", @"Art/body"); TextureStatic.Load("lowerLeg", @"Art/body"); TextureStatic.Load("rArm", @"Art/body"); TextureStatic.Load("rHand", @"Art/body"); TextureStatic.Load("thigh", @"Art/body"); TextureStatic.Load("torso", @"Art/body"); float a = 0; //float b = 0; Bone torso = new Bone(null, Vector2.Zero, new Vector2(160, 53), 107, 230, "torso", -0.06f); Bone rThigh = new Bone(torso, new Vector2(-26, 30), new Vector2(10, 30), 58, 192, "thigh", 0.02f); Bone lThigh = new Bone(torso, new Vector2(27, 30), new Vector2(10, 30), 58, 192, "thigh", 0.02f); Bone rShin = new Bone(rThigh, new Vector2(-2, 100), new Vector2(18, 30), 110, 223, "lowerLeg", 0.02f); Bone lShin = new Bone(lThigh, new Vector2(-2, 100), new Vector2(18, 30), 110, 223, "lowerLeg", 0.02f); Bone lArm = new Bone(torso, new Vector2(-35, -116), new Vector2(10, 15), 35, 145, "rArm", 0.021f); Bone rArm = new Bone(torso, new Vector2(42, -116), new Vector2(10, 20), 35, 145, "lArm", 0.021f); Bone lFore = new Bone(lArm, new Vector2(0, 96), new Vector2(8, 12), 26, 137, "fArm", 0.0211f); Bone rFore = new Bone(rArm, new Vector2(0, 96), new Vector2(8, 12), 26, 137, "fArm", 0.0211f); Bone lHand = new Bone(lFore, new Vector2(-1, 90), new Vector2(3, 38), 65, 68, "lHand", 0.022f); Bone rHand = new Bone(rFore, new Vector2(-1, 90), new Vector2(3, 28), 65, 68, "rHand", 0.022f); //scale = .5f; Bone head = new Bone(torso, new Vector2(0, -154), new Vector2(5, 55), 103, 116, "head1", 0.02f); //Bone head = new Bone(torso, new Vector2(0 , -65), new Vector2(3.25f, 35.75f), 103 , 116 , "head1", 0.02f); b.AddBone(torso); b.AddBone(rThigh); b.AddBone(lThigh); b.AddBone(rShin); b.AddBone(lShin); b.AddBone(lArm); b.AddBone(rArm); b.AddBone(lFore); b.AddBone(rFore); b.AddBone(lHand); b.AddBone(rHand); b.AddBone(head); return(b); }
public titScene() { counter = 0; sw.Start(); TextureStatic.Load("logo3", @"Art/titleScreen"); TextureStatic.Load("bg", @"Art/titleScreen"); TextureStatic.Load("mark", @"Art/titleScreen"); TextureStatic.Load("pic1", @"Art/titleScreen"); TextureStatic.Load("pic2", @"Art/titleScreen"); TextureStatic.Load("pic3", @"Art/titleScreen"); Song bgm = Cloud.content.Load <Song>("The Whip Theme"); MediaPlayer.Play(bgm); MediaPlayer.IsRepeating = true; }
/// <summary> /// Loads the content of a game. There will be one of these methods per mini game /// </summary> public static void LoadSolitudeContent() { //load the walls TextureStatic.Load("solitudeWallSmooth", @"Solitude\Art\wall-smooth"); TextureStatic.Load("solitudeWallHandHold", @"Solitude\Art\wall-handhold"); TextureStatic.Load("solitudeWallGrip", @"Solitude\Art\wall-grip"); TextureStatic.Load("solitudeWallMetal", @"Solitude\Art\wall-metal"); TextureStatic.Load("solitudeWallHot", @"Solitude\Art\wall-hot"); TextureStatic.Load("solitudeWallCold", @"Solitude\Art\wall-cold"); TextureStatic.Load("solitudeWallSpike", @"Solitude\Art\wall-spike"); TextureStatic.Load("solitudeWallDoor", @"Solitude\Art\wall-door"); TextureStatic.Load("solitudeGripDoor", @"Solitude\Art\door-metal"); TextureStatic.Load("bullet", @"Solitude\Art\bullet"); TextureStatic.Load("sentinel", @"Solitude\Art\sentinel"); TextureStatic.Load("bomb", @"Solitude\Art\bomb"); TextureStatic.Load("solitudeExplosion", @"Solitude\Art\explosion"); TextureStatic.Load("solitudeMauler", @"Solitude\Art\mauler"); TextureStatic.Load("fighter", @"Solitude\Art\fighter"); TextureStatic.Load("terminal", @"Solitude\Art\terminal"); TextureStatic.Load("arrow", @"Solitude\Art\arrow"); TextureStatic.Load("arrow-body", @"Solitude\Art\arrow-body"); TextureStatic.Load("ty", @"Solitude\Art\ty"); TextureStatic.Load("solitudeBorder", @"Solitude\Art\Outerborder"); //load the player TextureStatic.Load("solitudePlayer", @"Solitude\Art\player"); TextureStatic.Load("solitudePlayerJetpack", @"Solitude\Art\player-jetpack"); TextureStatic.Load("playerLives", @"Solitude\Art\player-lives"); TextureStatic.Load("jetpackFlame", @"Solitude\Art\jetpack-flame"); // TODO: load all Textures. // TODO: load all Audio. GameWorld.audio.LoadSong("eerie1", @"Solitude\Music\Eerie1"); GameWorld.audio.LoadSong("heartbeat1", @"Solitude\Music\heartbeat1"); GameWorld.audio.LoadSong("bad", @"Solitude\Music\Bad"); GameWorld.audio.LoadSong("breakbeat", @"Solitude\Music\breakbeat"); GameWorld.audio.LoadSong("solitudePiano", @"Solitude\Music\piano"); // TODO: load all Fonts, and anything else. }
/// <summary> /// The origins of each image, for quick reference. /// </summary> /// <param name="asset">The name of the asset you want to use.</param> /// <param name="directory">The directory containing the asset.</param> public Sprite(String asset, String directory, Vector2 pos, Vector2 org, Object parentObj) { TextureStatic.Load(asset, directory); position = pos; origin = org; depth = 1.0f; flip = false; blend = Color.White; rotation = 0.0f; scale = 1.0f; content = asset; parent = parentObj; Texture2D t = TextureStatic.Get(asset); dimensions = new Vector2(t.Width, t.Height); bounding = dimensions; bposition = origin; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { content = Content; graphics = GraphicsDevice; graphics.PresentationParameters.BackBufferWidth = screenWidth; //GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width; graphics.PresentationParameters.BackBufferHeight = screenHeight; #if !XBOX graphics.PresentationParameters.IsFullScreen = false; #endif // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); TextureStatic.Load("Blank", @"Art"); TextureStatic.Load("court", @"Art"); TextureStatic.Load("Strosacker", @"Art"); TextureStatic.Load("Abutton", @"Art"); TextureStatic.Load("Xbutton", @"Art"); TextureStatic.Load("Bbutton", @"Art"); TextureStatic.Load("Ybutton", @"Art"); TextureStatic.Load("black", @"Art"); fontMain = content.Load <SpriteFont>("AgencyFB"); fontFixed = content.Load <SpriteFont>("Fixed"); fontAnswer = content.Load <SpriteFont>("Answer"); fontCollege = content.Load <SpriteFont>("College"); //fontFixed = content.Load<SpriteFont>("Courier New"); //Song bgm = content.Load<Song>("music"); //MediaPlayer.Play(bgm); //MediaPlayer.IsRepeating = true; Window.Title = "Mark Starr's Greek Week 12"; //sceneDriver.Push(new TriviaScene()); //sceneDriver.Push(new BasketballScene()); sceneDriver.Push(new titScene()); }
public tentacle(Vector2 pos, Scene par) { string dir = "BonePix"; TextureStatic.Load("tentacle_tip_1", dir); TextureStatic.Load("tentacle_2", dir); TextureStatic.Load("tentacle_3", dir); TextureStatic.Load("tentacle_4", dir); TextureStatic.Load("tentacle_5", dir); TextureStatic.Load("tentacle_base", dir); position = pos; depth = 0.9f; parent = par; vel = new Vector2(0, 0); animator = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Idle), this.position.X, this.position.Y); animator.Depth = .2f; sprite = new Sprite("bus", @"Art", new Vector2(10000, 10000), new Vector2(150, 150), this);//anispr; sprite.bounding = new Vector2(1, 1); sprite.bposition = new Vector2(1, 1); }
public TriviaScene() { Song bgm = Cloud.content.Load <Song>("MilitaireElectronic"); MediaPlayer.Play(bgm); MediaPlayer.IsRepeating = true; Camera2D.cam.Zoom = .5f; animator = new BoneAnimator(null, StaticStanceplayer.GetBoneSet(), StaticStanceplayer.Get(playerStance.Idle), 0, 0); animator.Depth = .6f; //animator.SetAnimation(StaticStanceplayer.GetAnimation(playerAnimation.Idle)); animator.Update(); animator2 = new BoneAnimator(null, StaticStanceplayer2.GetBoneSet(), StaticStanceplayer2.Get(player2Stance.Idle), 0, 0); animator2.Depth = .6f; //animator2.SetAnimation(StaticStanceplayer2.GetAnimation(player2Animation.Idle)); animator2.Update(); answers.Clear(); tr = new StreamReader("../../trivia.txt"); renderables = new RenderableCollection(); Physics.collisions = new CollisionHandler(renderables); toAdd = new List <Renderable>(); toRemove = new List <Renderable>(); TextureStatic.Load("questionBG", @"Art"); TextureStatic.Load("playerAnswerBG", @"Art"); TextureStatic.Load("unknown", @"Art"); TextureStatic.Load("pod", @"Art"); //Ball = new ball(new Vector2(120, 150), this); //renderables.Add(Ball); }
/// <summary> /// Loads the content of a game. There will be one of these methods per mini game /// </summary> public static void LoadSPRGameContent() { // TODO: load all Textures. TextureStatic.Load("4SideFriendlyRobot", @"SPRGame\4sidedrobotalt"); TextureStatic.Load("4SideEnemyRobot", @"SPRGame\4sidedenemyrobot2"); TextureStatic.Load("BlankSide", @"SPRGame\blankside"); TextureStatic.Load("Axe", @"SPRGame\axe_aligned"); TextureStatic.Load("Gun", @"SPRGame\gun_aligned"); TextureStatic.Load("Shield", @"SPRGame\shield_aligned"); TextureStatic.Load("Projectile", @"SPRGame\whitestuff"); TextureStatic.Load("background", @"SPRGame\SPRbackground"); TextureStatic.Load("boxartSPR", @"SPRGame\SPRBoxArt"); TextureStatic.Load("pic1", @"SPRGame\1"); TextureStatic.Load("pic2", @"SPRGame\5"); TextureStatic.Load("pic3", @"SPRGame\2"); TextureStatic.Load("pic4", @"SPRGame\3"); TextureStatic.Load("pic5", @"SPRGame\4"); // TODO: load all Audio. GameWorld.audio.LoadSong("intro", @"SPRGame\maybe2"); GameWorld.audio.LoadSong("sprloadout", @"SPRGame\sprloadout"); GameWorld.audio.LoadSong("sprbattle", @"SPRGame\sprbattle"); // TODO: load all Fonts, and anything else. }
// returns the set of bones used for the tentacle (sort of like a model) public static BoneSet GetBoneSet() { /* TODO: Complete this set */ BoneSet b = new BoneSet(); // Bone(Parent, Offset, Origin, Length, Width, Texture, Depth, [angle, color, alpha]) int rando = Cloud.randCloud.Next(1, 14); string a = "lArm"; string d = "rArm"; string c = "torso"; switch (rando) { case 1: a = "lArmBeta"; d = "rArmBeta"; c = "torsoBeta"; break; case 2: a = "lArmDelt"; d = "rArmDelt"; c = "torsoDelt"; break; case 3: a = "lArmDeltaChi"; d = "rArmDeltaChi"; c = "torsoDeltaChi"; break; case 4: a = "lArmDU"; d = "rArmDU"; c = "torsoDU"; break; case 5: a = "lArmFIJI"; d = "rArmFIJI"; c = "torsoFIJI"; break; case 6: a = "lArmPhiKappaTheta"; d = "rArmPhiKappaTheta"; c = "torsoPhiKappaTheta"; break; case 7: a = "lArmPhiPsi"; d = "rArmPhiPsi"; c = "torsoPhiPsi"; break; case 8: a = "lArmPhiTau"; d = "rArmPhiTau"; c = "torsoPhiTau"; break; case 14: a = "lArmSigChi"; d = "rArmSigChi"; c = "torsoSigChi"; break; case 9: a = "lArmSigEp"; d = "rArmSigEp"; c = "torsoSigEp"; break; case 10: a = "lArmSigNu"; d = "rArmSigNu"; c = "torsoSigNu"; break; case 11: a = "lArmThetaChi"; d = "rArmThetaChi"; c = "torsoThetaChi"; break; case 12: a = "lArmZBT"; d = "rArmZBT"; c = "torsoZBT"; break; case 13: a = "lArmZetaPsi"; d = "rArmZetaPsi"; c = "torsoZetaPsi"; break; default: break; } TextureStatic.Load("fArm", @"Art/body"); TextureStatic.Load("head2", @"Art/body"); TextureStatic.Load(a, @"Art/body"); TextureStatic.Load("lHand", @"Art/body"); TextureStatic.Load("lowerLeg", @"Art/body"); TextureStatic.Load(d, @"Art/body"); TextureStatic.Load("rHand", @"Art/body"); TextureStatic.Load("thigh", @"Art/body"); TextureStatic.Load(c, @"Art/body"); //float a = 0; //float b = 0; Bone torso = new Bone(null, Vector2.Zero, new Vector2(160, 53), 107, 230, c, -0.06f); Bone rThigh = new Bone(torso, new Vector2(-26, 30), new Vector2(10, 30), 58, 192, "thigh", 0.02f); Bone lThigh = new Bone(torso, new Vector2(27, 30), new Vector2(10, 30), 58, 192, "thigh", 0.02f); Bone rShin = new Bone(rThigh, new Vector2(-2, 100), new Vector2(18, 30), 110, 223, "lowerLeg", 0.02f); Bone lShin = new Bone(lThigh, new Vector2(-2, 100), new Vector2(18, 30), 110, 223, "lowerLeg", 0.02f); Bone lArm = new Bone(torso, new Vector2(-35, -116), new Vector2(10, 15), 35, 145, d, 0.021f); Bone rArm = new Bone(torso, new Vector2(42, -116), new Vector2(10, 20), 35, 145, a, 0.021f); Bone lFore = new Bone(lArm, new Vector2(0, 96), new Vector2(8, 12), 26, 137, "fArm", 0.0211f); Bone rFore = new Bone(rArm, new Vector2(0, 96), new Vector2(8, 12), 26, 137, "fArm", 0.0211f); Bone lHand = new Bone(lFore, new Vector2(-1, 90), new Vector2(3, 38), 65, 68, "lHand", 0.022f); Bone rHand = new Bone(rFore, new Vector2(-1, 90), new Vector2(3, 28), 65, 68, "rHand", 0.022f); //scale = .5f; Bone head = new Bone(torso, new Vector2(0, -154), new Vector2(5, 55), 103, 116, "head2", 0.02f); //Bone head = new Bone(torso, new Vector2(0 , -65), new Vector2(3.25f, 35.75f), 103 , 116 , "head1", 0.02f); b.AddBone(torso); b.AddBone(rThigh); b.AddBone(lThigh); b.AddBone(rShin); b.AddBone(lShin); b.AddBone(lArm); b.AddBone(rArm); b.AddBone(lFore); b.AddBone(rFore); b.AddBone(lHand); b.AddBone(rHand); b.AddBone(head); return(b); }
public GameScene() { sky = Color.FromNonPremultiplied(78, 142, 203, 255); grass = Color.FromNonPremultiplied(45, 179, 75, 255); isDead = false; string dir = "BonePix"; TextureStatic.Load("tentacle_tip_1", dir); TextureStatic.Load("tentacle_2", dir); TextureStatic.Load("tentacle_3", dir); TextureStatic.Load("tentacle_4", dir); TextureStatic.Load("tentacle_5", dir); TextureStatic.Load("tentacle_base", dir); animator = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Idle), 0, 0); animator.Depth = .6f; animator2 = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Walk1), 0, 0); animator2.Depth = .7f; animator3 = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Walk4), 0, 0); animator3.Depth = .7f; animator4 = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Walk4), 0, 0); animator4.Depth = .6f; animator5 = new BoneAnimator(null, StaticStancetentacle.GetBoneSet(), StaticStancetentacle.Get(tentacleStance.Walk4), 0, 0); animator5.Depth = .7f; roadHeight = 200; counter = 0; worldSpeed = -10; particleTimer = 0; edgeLine = -250; renderables = new RenderableCollection(); Physics.collisions = new CollisionHandler(renderables); toAdd = new List <Renderable>(); toRemove = new List <Renderable>(); player = new Player(new Vector2(120, 150), this); renderables.Add(player); mainbg = new Background("road_railing", @"Art\Backgrounds", new Vector2(-360, 60), new Vector2(-10, 0), 0.15f, true, this); renderables.Add(mainbg); farbg = new Background("far_bg", @"Art\Backgrounds", new Vector2(-360, -370), new Vector2(-10, 0), 0.1f, true, this); renderables.Add(farbg); midbg = new Background("middle_bg", @"Art\Backgrounds", new Vector2(-360, -340), new Vector2(-10, 0), 0.12f, true, this); renderables.Add(midbg); forebg = new Background("foreground_railing", @"Art\Backgrounds", new Vector2(-360, 290), new Vector2(-10, 0), 0.999f, true, this); renderables.Add(forebg); roadbg = new Background("road", @"Art\Backgrounds", new Vector2(-360, 110), new Vector2(-10, 0), 0.11f, true, this); renderables.Add(roadbg); /*voidbg = new Background("void", @"Art", new Vector2(-360, -202), Vector2.Zero, 0.2f, false, this); * renderables.Add(voidbg);*/ TextureStatic.Load("void", "Art"); //tentacle tn = new tentacle(new Vector2(0, 0), this); //renderables.Add(tn); vanSpeed = 0; voidLine = -360; oscillator = 0; animator.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Idle)); animator.Update(); animator2.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Walk)); animator2.Update(); animator3.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Walk2)); animator3.Update(); animator4.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Walk3)); animator4.Update(); animator5.SetAnimation(StaticStancetentacle.GetAnimation(tentacleAnimation.Walk4)); animator5.Update(); }