Пример #1
0
        private void OnFinished(GameState state)
        {
            IsFinished = true;

            var script = new LevelFinishedScript(_game);
            script.Stopped += (s, e) =>
            {
                var handler = Finished;
                if (handler != null)
                {
                    handler(this, EventArgs.Empty);
                }
            };

            state.AddScript(script);
            state.GameStory.MarkLevelAsPassed(Name);
        }
Пример #2
0
        private void OnFinished()
        {
            IsFinished = true;

            var script = new LevelFinishedScript();
            script.Stopped += (s, e) =>
            {
                var handler = Finished;
                if (handler != null)
                {
                    handler(this, EventArgs.Empty);
                }
            };

            _game.Services.GetService<GameState>().AddScript(script);
        }