Exemple #1
0
        public string JoystickLayoutPatch;// => JoystickLayoutPatches.WithZoomInAndOut;

        //DebugHud _debug;
        protected override void Start()
        {
            InitResourceCache();

            InitUiInfo();

            InitLoadingScreen();

            Task.Run(async() => { await InitTracks(); }).Wait();

            LaunchScene(GameScenesEnumeration.MENU);

            JsonReaderVehicles.GetVehicleConfig();

            CharacterLevelData.PointsToNextLevel();

            VehicleManager.Instance.Init();

#if DEBUG
            // TEST DATA FOR BUYING VEHICLES

            CharacterManager.Instance.Wallet = 100000;

            var newComponentsContainer = new CollectedComponentsContainer {
                CollectedComponentsList = new List <CollectedComponents>()
            };
            var components = VehicleManager.Instance.CollectedComponents;
            foreach (var c in components.CollectedComponentsList)
            {
                var newComponents = new CollectedComponents {
                    VehicleId         = c.VehicleId,
                    VehicleComponents = new Components()
                };
                newComponents.VehicleComponents.Brakes      = true;
                newComponents.VehicleComponents.Performance = true;
                newComponents.VehicleComponents.Suspensions = true;
                newComponents.VehicleComponents.Wheels      = true;
                newComponentsContainer.CollectedComponentsList.Add(newComponents);
            }
            VehicleManager.Instance.CollectedComponents = newComponentsContainer;

            //_debug = Engine.CreateDebugHud();
            //_debug.ToggleAll();
#endif
        }
Exemple #2
0
        public SceneGarage(Game game) : base(game)
        {
            _idDVehicle = VehicleManager.Instance.SelectedVehicleModel != null ? VehicleManager.Instance.SelectedVehicleModel.IdVehicle : -1;
            if (_idDVehicle < 0)
            {
                _idDVehicle = 0;
            }

            _dim   = GameInstance.ScreenInfo;
            _root  = GameInstance.UI.Root;
            _cache = GameInstance.ResourceCache;
            _font  = _cache.GetFont("Fonts/OpenSans-Bold.ttf");
            JsonReaderVehicles.GetVehicleConfig();

            _currentVehicleModel      = VehicleManager.Instance.SelectedVehicleModel;
            _lastSelectedVehicleModel = _currentVehicleModel;

            CreateUI();
        }