public void DrawPause(SpriteBatch sB, ManagerHelper mH) { if (pauser != null) { pauseScreen.Draw(sB, Vector2.Zero, mH); pauseInstructions.Draw(sB, Vector2.Zero, mH); mH.GetTextureManager().DrawString(sB, "Quit", new Vector2(140, 650), Color.White, TextureManager.FontSizes.small, false); mH.GetTextureManager().DrawString(sB, "Continue", new Vector2(950, 650), Color.White, TextureManager.FontSizes.small, false); mH.GetTextureManager().DrawString(sB, "Paused", Level.DEFAUT_SCREEN_SIZE / 2 + new Vector2(0, -75), GetPlayerColorFromType(pauser), TextureManager.FontSizes.small, true); } }
public void LoadContent() { foreach (Mine mine in inactiveMines) { mine.LoadContent(managers.GetTextureManager()); } }
public virtual void Set(String a, Vector2 p, NPC n, Vector2 v, int d, bool iE, bool collide, float dT, ManagerHelper mH) { asset = a; position = p; velocity = v; damage = d; // set damage existenceTime = 4; // Default 10 seconds drawTime = dT; //set up draw time affiliation = n.GetAffiliation(); //Sets up hurting creator = n; isExplosive = iE; shouldCollide = collide; //Get x and y values from angle and set up direction rotation = DWMath.Atan2(velocity.Y, velocity.X); //No friction drag = 0; LoadContent(mH.GetTextureManager()); if (!(this is Tossable)) { setModeIndex();//set mode index } }
public void LoadContent(ManagerHelper mH) { foreach (LightningTrail l in inactiveLightning) { l.LoadContent(mH.GetTextureManager()); } foreach (Fireball f in inactiveFireballs) { f.LoadContent(mH.GetTextureManager()); } foreach (WaterPool w in inactiveWaterpools) { w.LoadContent(mH.GetTextureManager()); } }
public void Initialize(ManagerHelper mH, List <Claimable> cL) { claimables = cL; foreach (Claimable c in claimables) { c.LoadContent(mH.GetTextureManager()); } }
public void Initialize(ManagerHelper mH, List <CTFBase> bL) { bases = bL; foreach (CTFBase b in bases) { b.LoadContent(mH.GetTextureManager()); } }
public void LoadContent(ManagerHelper mH) { foreach (Camera c in cameras) { c.dimensions.X = (int)mH.GetLevelSize().X / 2; c.dimensions.Y = (int)mH.GetLevelSize().Y / 2; } foreach (HUD h in huds) { h.LoadContent(mH); } if (SplitScreen != null) { SplitScreen.LoadContent(mH.GetTextureManager()); } pauseScreen.LoadContent(mH.GetTextureManager()); pauseInstructions.LoadContent(mH.GetTextureManager()); }
public void Initialize(ManagerHelper mH, List <ConquestBase> bL) { bases = bL; winScore = bL.Count; foreach (ConquestBase b in bases) { b.LoadContent(mH.GetTextureManager()); } base.Initialize(mH); }
public void LoadContent(ManagerHelper mH) { front.LoadContent(mH.GetTextureManager()); back.LoadContent(mH.GetTextureManager()); damage.LoadContent(mH.GetTextureManager()); health.LoadContent(mH.GetTextureManager()); power.LoadContent(mH.GetTextureManager()); gun.LoadContent(mH.GetTextureManager()); toss.LoadContent(mH.GetTextureManager()); teammate.LoadContent(mH.GetTextureManager()); teammate.SetFrameIndex(NPC.GetTeam(myCamera.GetTeammateColor())); teammate.UpdateFrame(); scoreboard.LoadContent(mH.GetTextureManager()); scoreboard.SetModeIndex(Math.Min(3, mH.GetGametype().GetTeams().Count - 1)); scoreboard.UpdateFrame(); timer.LoadContent(mH.GetTextureManager()); damageWidth = health.GetFrame().Width; healthWidth = health.GetFrame().Width; powerWidth = power.GetFrame().Width; }
public void Add(NPC a) { if (a.GetOriginPosition() == new Vector2(-1, -1)) { return; } if (a is Bomber) { bombers.Add(a); a.LoadContent(managers.GetTextureManager()); return; } List <NPC> tempList; if (agents.TryGetValue(a.GetAffiliation(), out tempList)) { tempList.Add(a); } else { tempList = new List <NPC> { a }; agents.Add(a.GetAffiliation(), tempList); } if (a is Commander) { stats[a.GetAffiliation()].IsAlive = true; commanders.Add((Commander)a); } a.LoadContent(managers.GetTextureManager()); allAgents.Add(a); }
public void Set(string a, int fI, int mI, Vector2 p, Vector2 v, float dT, float d, float t, float rA, ManagerHelper mH) { asset = a; position = p; velocity = v; existanceTime = MAX_EXIST_TIME; drawTime = dT; drag = d; thrust = t; rotationAmount = rA; LoadContent(mH.GetTextureManager()); frameIndex = fI; modeIndex = mI; }
public void Set(Vector2 p, NPC.AffliationTypes aT, ManagerHelper mH) { position = p; animateTime = 0.3f; timer = 0; health = 150; affiliation = aT; LoadContent(mH.GetTextureManager()); mH.GetAudioManager().Play(AudioManager.LARGE_ROCK, (float)mH.GetRandom().NextDouble() / 4 + 0.75f, AudioManager.RandomPitch(mH), 0, false); for (int i = 0; i < 10; i++) { mH.GetParticleManager().AddStandardSmoke(origin + position, 64); } }
public void AddTopObject(Environment e) { topObjects.Add(e); e.LoadContent(managers.GetTextureManager()); }
public void DrawScores(SpriteBatch sB, ManagerHelper mH) { //Draw time left int timeLeft = (int)(mH.GetGametype().GetGameEndTimer()) + 1, mins = timeLeft / 60, secs = timeLeft % 60; if (mins != lastMinute) { lastMinute = mins; gameTime = mins + ":" + ((secs < 10) ? "0" : "") + secs; } if (secs != lastSecond) { lastSecond = secs; gameTime = mins + ":" + ((secs < 10) ? "0" : "") + secs; } timer.Draw(sB, Vector2.Zero, mH); mH.GetTextureManager().DrawString(sB, gameTime, timer.GetOriginPosition(), Color.White, TextureManager.FontSizes.small, true); scoreboard.Draw(sB, Vector2.Zero, mH); for (int x = 0; x < mH.GetGametype().GetTeams().Count; x++) { Color teamColor = Color.White; switch (mH.GetGametype().GetTeams()[x]) { case NPC.AffliationTypes.red: teamColor = Color.Red; break; case NPC.AffliationTypes.blue: teamColor = Color.Blue; break; case NPC.AffliationTypes.green: teamColor = Color.Green; break; case NPC.AffliationTypes.yellow: teamColor = Color.Yellow; break; } if (mH.GetGametype().GetTeams()[x] != NPC.AffliationTypes.black) { if (lastScores[x] != mH.GetGametype().GetScores()[x]) { lastScores[x] = mH.GetGametype().GetScores()[x]; lastScoreStrings[x] = lastScores[x] + ""; } mH.GetTextureManager().DrawString(sB, lastScoreStrings[x], rightPos - new Vector2((4 - x) * 82 - 24, -10), teamColor, TextureManager.FontSizes.small, true); } } }