Add support for transient text notifications matching speech notifications
This commit is contained in:
committed by
Paul Chote
parent
9f723be65a
commit
24b9482cc1
@@ -49,6 +49,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[NotificationReference("Sounds")]
|
||||
public readonly string LevelUpNotification = null;
|
||||
|
||||
public readonly string LevelUpTextNotification = null;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new GainsExperience(init, this); }
|
||||
}
|
||||
|
||||
@@ -119,6 +121,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!silent)
|
||||
{
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", info.LevelUpNotification, self.Owner.Faction.InternalName);
|
||||
TextNotificationsManager.AddTransientLine(info.LevelUpTextNotification, self.Owner);
|
||||
|
||||
if (info.LevelUpImage != null && info.LevelUpSequence != null)
|
||||
self.World.AddFrameEndTask(w => w.Add(new SpriteEffect(self, w, info.LevelUpImage, info.LevelUpSequence, info.LevelUpPalette)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user