Sync up the countdown timer and the objectives button flash with the game speed
This commit is contained in:
@@ -87,7 +87,7 @@ namespace OpenRA.Mods.RA.Missions
|
||||
}
|
||||
var font = Game.Renderer.Fonts["Bold"];
|
||||
var text = "{0}: {1}".F(Header, WidgetUtils.FormatTime(Timer.TicksLeft));
|
||||
font.DrawTextWithContrast(text, Position, Timer.TicksLeft <= 25 * 10 && Game.LocalTick % 60 <= 30 ? Color.Red : Color.White, Color.Black, 1);
|
||||
font.DrawTextWithContrast(text, Position, Timer.TicksLeft <= 25 * 10 && Game.LocalTick % 50 < 25 ? Color.Red : Color.White, Color.Black, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
objectives = world.WorldActor.TraitsImplementing<IHasObjectives>().First();
|
||||
|
||||
objectivesButton = gameRoot.Get<ButtonWidget>("OBJECTIVES_BUTTON");
|
||||
objectivesButton.IsHighlighted = () => Game.LocalTick % 60 <= 30 && objectivesButton.Highlighted;
|
||||
objectivesButton.IsHighlighted = () => Game.LocalTick % 50 < 25 && objectivesButton.Highlighted;
|
||||
objectivesButton.OnClick += () => objectivesButton.Highlighted = false;
|
||||
|
||||
objectives.OnObjectivesUpdated += UpdateObjectives;
|
||||
|
||||
Reference in New Issue
Block a user