Exemple #1
0
        public void JumpTo(string system, string exitpos)
        {
            //Find object
            var sys = Game.GameData.GetSystem(system);
            var ep  = exitpos.ToLowerInvariant();
            var obj = sys.Objects.Where((o) => o.Nickname.ToLowerInvariant() == ep).First();

            //Setup player
            PlayerSystem      = system;
            PlayerOrientation = obj.Rotation == null ? Matrix3.Identity : new Matrix3(obj.Rotation.Value);
            PlayerPosition    = Vector3.Transform(new Vector3(0, 0, 500), PlayerOrientation) + obj.Position;          //TODO: This is bad
            //Switch
            Game.ChangeState(new SpaceGameplay(Game, this));
        }
 void SceneChangeRequired()
 {
     if (PlayerBase != null)
     {
         Game.ChangeState(new RoomGameplay(Game, this, PlayerBase));
         hasChanged = true;
     }
     else
     {
         worldReady = false;
         toAdd      = new List <GameObject>();
         gp         = new SpaceGameplay(Game, this);
         Game.ChangeState(gp);
         hasChanged = true;
     }
 }
Exemple #3
0
 void SceneChangeRequired()
 {
     gameplayActions.Clear();
     objects = new Dictionary <int, GameObject>();
     if (PlayerBase != null)
     {
         Game.ChangeState(new RoomGameplay(Game, this, PlayerBase));
         hasChanged = true;
     }
     else
     {
         gp = new SpaceGameplay(Game, this);
         Game.ChangeState(gp);
         hasChanged = true;
     }
 }
Exemple #4
0
        public void Start()
        {
            if (MissionNum != 0 && (MissionNum - 1) < Game.GameData.Ini.Missions.Count)
            {
                msnrun = new MissionRuntime(Game.GameData.Ini.Missions[MissionNum - 1], this);
            }

            if (PlayerBase != null)
            {
                Game.ChangeState(new RoomGameplay(Game, this, PlayerBase));
            }
            else
            {
                worldReady = false;
                toAdd      = new List <GameObject>();
                gp         = new SpaceGameplay(Game, this);
                Game.ChangeState(gp);
            }
        }
Exemple #5
0
        public void Start()
        {
            if (MissionNum != 0 && (MissionNum - 1) < Game.GameData.Ini.Missions.Count)
            {
                msnrun = new MissionRuntime(Game.GameData.Ini.Missions[MissionNum - 1], this);
            }

            if (PlayerBase != null)
            {
                Game.ChangeState(new RoomGameplay(Game, this, PlayerBase));
            }
            else
            {
                Game.ChangeState(new SpaceGameplay(Game, this));
            }
        }