OpenRA.Sound.PlayNotification C# (CSharp) Method

PlayNotification() public method

public PlayNotification ( OpenRA.Ruleset rules, Player player, string type, string notification, string variant ) : bool
rules OpenRA.Ruleset
player Player
type string
notification string
variant string
return bool
        public bool PlayNotification(Ruleset rules, Player player, string type, string notification, string variant)
        {
            if (rules == null)
                throw new ArgumentNullException("rules");

            if (type == null || notification == null)
                return false;

            return PlayPredefined(rules, player, null, type.ToLowerInvariant(), notification, variant, true, WPos.Zero, 1f, false);
        }

Usage Example

Example #1
0
        internal static void StartGame(string mapUID, bool isShellmap)
        {
            BeforeGameStart();

            var map = modData.PrepareMap(mapUID);

            viewport           = new Viewport(new int2(Renderer.Resolution), map.Bounds, Renderer);
            orderManager.world = new World(modData.Manifest, map, orderManager, isShellmap);
            worldRenderer      = new WorldRenderer(orderManager.world);

            if (orderManager.GameStarted)
            {
                return;
            }
            Ui.SelectedWidget = null;

            orderManager.LocalFrameNumber = 0;
            orderManager.LastTickTime     = Environment.TickCount;
            orderManager.StartGame();
            worldRenderer.RefreshPalette();

            if (!isShellmap)
            {
                Sound.PlayNotification(null, "Speech", "StartGame", null);
            }
        }
All Usage Examples Of OpenRA.Sound::PlayNotification