Exemple #1
0
        public override void Init()
        {
            base.Init();

            MyMissions.Unload();
            if (MyMissions.ActiveMission != null)
            {
                MyMissions.ActiveMission.Load();
            }

            EventLog = new MyEventLog();
            MyMissions.RefreshAvailableMissions();
        }
Exemple #2
0
        public virtual void Init()
        {
            //Create player if it was not loaded from DB
            if (Player == null)
            {
                Player = new MyPlayer();
            }

            //Create player if it was not loaded from DB
            if (EventLog == null)
            {
                EventLog = new MyEventLog();
            }

            if (FactionRelationChanges == null)
            {
                FactionRelationChanges = new MyFactionRelationChanges();
            }

            GameDateTime = new DateTime(2081, 1, 1);

            if (Inventory == null)
            {
                Inventory = new MyInventory();
            }

            if (PlayerFriends == null)
            {
                PlayerFriends = new MyPlayerFriends();
            }

            if (MotherShipPosition == null)
            {
                MotherShipPosition = new MyMotherShipPosition();
            }

            Is2DSector = false;

            ////Create playership if it was not loaded from DB
            //if (Player.Ship == null)
            //{
            //    Player.Ship = new MySmallShip(1.0f, MyClientServer.LoggedPlayer.GetDisplayName().ToString());
            //    Player.Ship.Init("MyShip", MySmallShip.CreateDefaultSmallShipObjectBuilder(Matrix.CreateWorld(Vector3.Zero, Vector3.Forward, Vector3.Up)));
            //    //Player.Ship.WorldMatrix = Matrix.CreateTranslation(0, 0, 0);
            //    Player.Ship.Inventory.MaxItems = 1500;
            //    Player.Ship.Inventory.FillInventoryWithAllItems();
            //}
        }
Exemple #3
0
        public virtual void Init()
        {
            //Create player if it was not loaded from DB
            if (Player == null)
            {
                Player = new MyPlayer();
            }

            //Create player if it was not loaded from DB
            if (EventLog == null)
            {
                EventLog = new MyEventLog();
            }

            if (FactionRelationChanges == null)
            {
                FactionRelationChanges = new MyFactionRelationChanges();
            }

            GameDateTime = new DateTime(2081, 1, 1);

            if (Inventory == null)
            {
                Inventory = new MyInventory();
            }

            if (PlayerFriends == null)
            {
                PlayerFriends = new MyPlayerFriends();
            }

            if (MotherShipPosition == null)
            {
                MotherShipPosition = new MyMotherShipPosition();
            }

            Is2DSector = false;

            ////Create playership if it was not loaded from DB
            //if (Player.Ship == null)
            //{
            //    Player.Ship = new MySmallShip(1.0f, MyClientServer.LoggedPlayer.GetDisplayName().ToString());
            //    Player.Ship.Init("MyShip", MySmallShip.CreateDefaultSmallShipObjectBuilder(Matrix.CreateWorld(Vector3.Zero, Vector3.Forward, Vector3.Up)));
            //    //Player.Ship.WorldMatrix = Matrix.CreateTranslation(0, 0, 0);
            //    Player.Ship.Inventory.MaxItems = 1500;
            //    Player.Ship.Inventory.FillInventoryWithAllItems();
            //}            
        }