示例#1
0
        protected override void OnActivateScene(object parameter)
        {
            app.RenderMouse    = false;
            app.MouseBoundings = view.Boundings;

            ClassicGame game = app.GameState as ClassicGame;

            if (BurntimeClassic.Instance.PreviousPlayerId != -1 &&
                BurntimeClassic.Instance.PreviousPlayerId != game.CurrentPlayerIndex)
            {
                // play player changed sound
                BurntimeClassic.Instance.Engine.Music.PlayOnce("06_MUS 06_HSC.ogg");
            }
            BurntimeClassic.Instance.PreviousPlayerId = game.CurrentPlayerIndex;

            view.Map      = (MapData)game.World.ActiveLocationObj.Map.MapData;
            view.Location = game.World.ActiveLocationObj;
            view.Player   = game.World.ActivePlayerObj;

            if (view.Player.RefreshScrollPosition)
            {
                view.CenterTo(view.Player.Character.Position);
            }
            else
            {
                view.ScrollPosition = view.Player.LocationScrollPosition;
            }
            gui.UpdatePlayer();

            view.Player.OnMainMap = false;

            game.MainMapView = false;

            app.GameState.Container.AddNotifycationHandler(this);

            // refresh speak/fight mode
            if (view.Location.IsCity && fightMode)
            {
                fightMode = false;
            }

            if (fightMode)
            {
                OnMenuFight();
            }
            else
            {
                OnMenuSpeak();
            }
        }
示例#2
0
        protected override void OnActivateScene(object parameter)
        {
            app.RenderMouse    = false;
            app.MouseBoundings = view.Boundings;

            ClassicGame game = app.GameState as ClassicGame;

            if (BurntimeClassic.Instance.PreviousPlayerId != -1 &&
                BurntimeClassic.Instance.PreviousPlayerId != game.CurrentPlayerIndex)
            {
                // play player changed sound
                BurntimeClassic.Instance.Engine.Music.PlayOnce("06_MUS 06_HSC.ogg");
            }
            BurntimeClassic.Instance.PreviousPlayerId = game.CurrentPlayerIndex;

            view.Ways   = (WayData)game.World.Ways.WayData;
            view.Map    = (MapData)game.World.Map.MapData;
            view.Player = game.World.ActivePlayerObj;
            if (game.World.ActivePlayerObj.RefreshMapScrollPosition)
            {
                view.CenterTo(view.Map.Entrances[game.World.ActivePlayerObj.Location].Area.Center);
            }
            else
            {
                view.ScrollPosition = game.World.ActivePlayerObj.MapScrollPosition;
            }
            gui.UpdatePlayer();

            game.World.ActivePlayerObj.OnMainMap = true;

            game.MainMapView = true;

            // refresh travel/info cursor
            if (infoMode)
            {
                OnMenuInfo();
            }
            else
            {
                OnMenuTravel();
            }
        }