protected virtual void draw_info(SpriteBatch sprite_batch) { // Labels InfoLabel.draw(sprite_batch); // Data //AvgRating.draw(sprite_batch); //Debug //EnemyAvgRating.draw(sprite_batch); AvgLvl.draw(sprite_batch); EnemyAvgLvl.draw(sprite_batch); Funds.draw(sprite_batch); Counter.draw(sprite_batch); }
public virtual void refresh() { // Does augury exist? if (Global.game_state.augury_event_exists()) { CommandWindow.set_text_color(2, "White"); } else { CommandWindow.set_text_color(2, "Grey"); } // Objective text Goal.text = Global.game_system.Objective_Text; Goal.offset = new Vector2(Font_Data.text_width(Goal.text) / 2, 0); // Info window // Rating float rating_factor; float player_rating = Global.battalion.deployed_average_rating; float enemy_rating = Global.battalion.enemy_rating; EnemyAvgLvl.SetColor(Global.Content, "Yellow"); rating_factor = (float)Math.Log(Global.battalion.enemy_threat, 2); int r = (int)(255 * MathHelper.Clamp(1 + rating_factor, 0, 1)); int g = (int)(255 * MathHelper.Clamp(1 - rating_factor, 0, 1)); EnemyAvgLvl.tint = new Color(r, g, 255); rating_factor = Global.battalion.enemy_threat; EnemyAvgLvl.text = string.Format("{0}x", rating_factor.ToString("0.00")); // Funds Funds.text = Global.battalion.gold.ToString(); }