public DrivingPlayManager() { _MainScript = Main.Instance; VehicleManagers = new List <iVehicleManager>(); _MainScript.OnFixedUpdate += MainScript_OnFixedUpdate; AddSkidMarks(); }
public DrivingPlayManager(iMain MainScript, int _selectedGameId) { VehicleManagers = new List <iVehicleManager>(); _MainScript = MainScript; SelectedGameID = _selectedGameId; MainScript.OnFixedUpdate += MainScript_OnFixedUpdate; MainScript.OnLevelLoaded += MainScript_OnLevelLoaded; AddSkidMarks(); //_sql = new SQLHelper(); //_sql.RunSQL("Delete From tblInput WHERE Event > 0"); }
//Constructor public SavedGameMenuItem() { Deleted = false; mainscript = Main.Instance; // goMain.GetComponent<Main>(); Object objSavedGameCanvas = Resources.Load("Prefabs/SavedGameCanvas"); Object objSavedGameImg = Resources.Load("Prefabs/SavedGameImage"); Canvas = (GameObject)GameObject.Instantiate(objSavedGameCanvas); OuterGameObject = Canvas; Img = (GameObject)GameObject.Instantiate(objSavedGameImg); Img.transform.SetParent(Canvas.transform); //goRenameInputField = GameObject.Find("RenameInputField"); btnSave = Img.transform.Find("btnSave").gameObject.GetComponent <Button>(); Button.ButtonClickedEvent Delegt = btnSave.onClick; Delegt.AddListener(delegate { Save(); }); Img.transform.Find("btnDetail").GetComponent <Button>().onClick.AddListener(delegate { ShowDetailPanel(); }); //Switch off the text editor and buttons cos we dont want to rename or save this Img.GetComponentInChildren <TextEditStarter>().enabled = false; Img.transform.Find("btnSave").gameObject.SetActive(false); Canvas.GetComponent <GraphicRaycaster>().enabled = false; }
void Start() { mainScript = Main.Instance; //GSPC = new GameStarterController(this, mainScript); ToggleGroup tg = GameObject.Find("pnlOpposition").GetComponent <ToggleGroup>(); foreach (Toggle t in tg.GetComponentsInChildren <Toggle>()) { if (t.name == mainScript.OpponentCount.ToString()) { t.isOn = true; } else { t.isOn = false; } } //Find how many segments int XSecCount; if (GameData.current.RdS.XSecs != null) { XSecCount = GameData.current.RdS.XSecs.Length; } else { XSecCount = Road.Instance.XSecs.Count; } numLaps.text = mainScript.Laps.ToString(); float Mult = (float)XSecCount * (float)mainScript.Laps / 6000f; float MultRounded = Mathf.RoundToInt(Mult * 10) / 10f; numMult.text = "X " + MultRounded.ToString(); GameObject.Find("RandomVehicles").GetComponent <Toggle>().isOn = mainScript.RandomVehicles; GameObject.Find("Ghost").GetComponent <Toggle>().isOn = mainScript.Ghost; }
public void Connect(iMain iMainCtrl) { m_iMain = iMainCtrl; // connect to Main interface for application text logging and link activity update, save interface in variable }
void Start() { Physics.gravity = Vector3.down * 9.8f; mainScript = Main.Instance; ChooseRaceClicked = false; }
public BuildingPlayManager(iMain MainScript, int _selectedGameId) { }