public override void Draw(Vector2 Position, Vector2 Size) { Render.DrawSprite(MyTexture, Position, Size, 0, TeamInfo.HudColors[ParentShip.GetTeam()]); Vector2 SliceSize = TargetSliceSize * Size; Game1.spriteBatch.Draw(SliceTexture, Position - SliceSize / 2, new Rectangle(0, 0, (int)( SliceTexture.Width * Math.Floor(ParentShip.HealthMult() * 50) / 50f), SliceTexture.Height), TeamInfo.HudColors[ParentShip.GetTeam()], 0, Vector2.Zero, SliceSize / new Vector2(SliceTexture.Width, SliceTexture.Height), SpriteEffects.None, 0); base.Draw(Position, Size); }
public override void Draw(Vector2 Position, Vector2 Size) { Render.DrawSprite(MyTexture, Position, Size, 0, TeamInfo.HudColors[ParentShip.GetTeam()] * Alpha); base.Draw(Position, Size); }
public override void Draw(Vector2 Position, Vector2 Size) { if (ProgressAlpha > 0) { Render.DrawSprite(OuterTexture, Position, Size * ProgressAlpha, 0, TeamInfo.HudColors[ParentShip.GetTeam()] * ProgressAlpha); Render.DrawSprite(InnerTexture, Position, Size * ProgressAlpha, ParentShip.GetOffenseProgress() * (float)Math.PI, TeamInfo.HudColors[ParentShip.GetTeam()] * ProgressAlpha); } if (EliminatedAlpha > 0) { Render.DrawSprite(EliminatedTexture, Position, Size * EliminatedAlpha, 0, TeamInfo.HudColors[WaveFSM.PlayerEliminatedState.LastEliminatedTeam] * EliminatedAlpha); } base.Draw(Position, Size); }
public override void PreDraw() { if (OutlineAlpha > 0 || ParentShip.DamageAlpha > 0) { Rectangle SceneViewRectangle = new Rectangle(0, 0, (int)ParentShip.sceneView.Size.X, (int)ParentShip.sceneView.Size.Y); if (OutlineAlpha > 0) { Game1.spriteBatch.Draw(OutlineTexture, SceneViewRectangle, TeamInfo.HudColors[ParentShip.GetTeam()] * OutlineAlpha); } if (ParentShip.DamageAlpha > 0) { Game1.spriteBatch.Draw(DamageTexture, SceneViewRectangle, Color.Red * ParentShip.DamageAlpha); } } }
public override bool Minimize() { return(base.Minimize() || (ParentShip.Dead && ParentShip.GetTeam() != WaveManager.ActiveTeam)); }
public override void Draw(Vector2 Position, Vector2 Size) { string Text = FactionManager.Factions[ParentShip.FactionNumber].BestSurvivedWave.ToString() + "<>" + FactionManager.Factions[ParentShip.FactionNumber].SurvivedMinutes.ToString() + ":" + FactionManager.Factions[ParentShip.FactionNumber].SurvivedSeconds.ToString() + ":" + FactionManager.Factions[ParentShip.FactionNumber].SurvivedMilliSeconds.ToString() + "\nMining Rings:" + FactionManager.Factions[ParentShip.FactionNumber].MiningPlatformCount.ToString(); Vector2 TextSize = TimerFont.MeasureString(Text); Render.DrawShadowedText(TimerFont, Text, Position - TextSize / 2, Vector2.One, TeamInfo.HudColors[ParentShip.GetTeam()], Color.Black); }