コード例 #1
0
 // Update is called once per frame
 public void EditVehicle()
 {
     GarageRotater.FOV = 47;
     state             = GarageState.Editor;
     Editor.gameObject.SetActive(true);
     ScheduledJob = 5;
 }
コード例 #2
0
 public void CloseDealerMenu()
 {
     state = GarageState.Garage;
     GarageView.gameObject.SetActive(true);
     DealerView.gameObject.SetActive(false);
     ScheduledJob = 5;
 }
コード例 #3
0
        //Execute the appropriate method - n.b. no if statements in sight!
        public void DealWithConditions()
        {
            HelmetState helmetState = GetHelmetState(formvalues["helmets"]);
            GarageState garageState = GetGarageState(formvalues["garages"]);

            ExecuteCondition[Key(helmetState, garageState)]();
        }
コード例 #4
0
 public void OpenDealerMenu()
 {
     ginitialized = false;
     state        = GarageState.Dealer;
     GarageView.gameObject.SetActive(false);
     DealerView.gameObject.SetActive(true);
     ScheduledJob = 5;
 }
コード例 #5
0
 public void ExitEditor()
 {
     GarageRotater.FOV = 60;
     state             = GarageState.Garage;
     Editor.gameObject.SetActive(false);
     GarageView.gameObject.SetActive(true);
     VehicleView.gameObject.SetActive(true);
     ScheduledJob = 5;
 }
コード例 #6
0
 public void SaveEditedVehicle()
 {
     GarageRotater.FOV = 60;
     SaveSystem.UpdateVehicleParts(Editor.target.GetInstalledParts(), SaveSystem.GetSelectedVehicleIndex());
     SaveSystem.AddLog(new Save.LogEntry("GarageManager", $"Updated vehicle parts {Editor.target.Name}"));
     state = GarageState.Garage;
     Editor.gameObject.SetActive(false);
     GarageView.gameObject.SetActive(true);
     VehicleView.gameObject.SetActive(true);
     ScheduledJob = 5;
 }
コード例 #7
0
 //gets a unique value for each HelmetState/GarageState combination to be used as a key to the dictionary
 private int Key(HelmetState helmetState, GarageState garageState)
 {
     return((int)helmetState + (int)garageState);
 }