// ----------------------------- PRESNAP STATES private void RUN_SnapReady() { if (Input.GetKeyDown(KeyCode.Space)) { FindObjectOfType <PC_Controller>().mState = PC_Controller.PC_STATE.SACTIVE; PRAC_Ath[] athletes = FindObjectsOfType <PRAC_Ath>(); for (int i = 0; i < athletes.Length; i++) { athletes[i].mState = PRAC_Ath.PRAC_ATH_STATE.SDOING_JOB; } // For now so it's not there when we run. Going to change this soon. cShowDefence.FStopShowingPlayArt(); mState = PRAC_STATE.SPLAY_RUNNING; } // We also need the camera to go to the higher perspective. if (Input.GetKeyDown(KeyCode.T)) { cShowDefence.FStopShowingPlayArt(); cShowDefence.FShowAllPlayRoles(IO_PlayList.FLOAD_PLAY_BY_NAME(rPracUI.mOffensivePlayName.text), IO_DefPlays.FLOAD_PLAY_BY_NAME(rPracUI.mDefensivePlayName.text), rSnapSpot); FindObjectOfType <CAM_PlayShowing>().FActivate(); mPreSnapState = PRESNAP_STATE.SHIGHCAM; } }
// For now, delete everything from the scene, and that's it. private void RUN_PostPlay() { PRAC_Ath[] athletes = FindObjectsOfType <PRAC_Ath>(); for (int i = 0; i < athletes.Length; i++) { Destroy(athletes[i].gameObject); } FindObjectOfType <PC_Controller>().mState = PC_Controller.PC_STATE.SINACTIVE; rPracUI.FRUN_OffPlaybook(); mState = PRAC_STATE.SPICK_PLAY; mPickPlayState = PICKPLAY_STATE.SOFFENSE; }
private void RUN_FinishedPicking() { // I guess this is where I transfer state? mState = PRAC_STATE.SPRE_SNAP; mPreSnapState = PRESNAP_STATE.SREADYTOSNAP; rPracUI.FRUN_Presnap(); FindObjectOfType <PC_Controller>().mState = PC_Controller.PC_STATE.SPRE_SNAP; // We wait until they click a play in the UI. cPlaySetter.FSetUpPlay(rPracUI.mOffensivePlayName.text, rPracUI.mDefensivePlayName.text, rSnapSpot); }
// ----------------------------- private void RUN_PlayRunning() { if (Input.GetKeyDown(KeyCode.Space)) { // Now we just repeat the whole shebang. mState = PRAC_STATE.SPOST_PLAY; } if (Input.GetKeyDown(KeyCode.I)) { Cursor.lockState = CursorLockMode.None; Cursor.visible = true; SceneManager.LoadScene("SN_MN_Main"); } }
void Start() { cPlaySetter = GetComponent <PRAC_SetUpPlay>(); cShowDefence = GetComponent <PRAC_ShowDefense>(); mState = PRAC_STATE.SPOST_PLAY; mPreSnapState = PRESNAP_STATE.SREADYTOSNAP; mPickPlayState = PICKPLAY_STATE.SOFFENSE; IO_PlayList.FLOAD_PLAYS(); IO_DefPlays.FLOAD_PLAYS(); IO_ZoneList.FLOAD_ZONES(); IO_RouteList.FLOAD_ROUTES(); PRS_AssignMan.FLOAD_PRIORITIES(); // Won't affect the build, but will affect the editor. IO_Settings.FLOAD_SETTINGS(); // IO_RouteList.FCONVERT_TO_TEXT_FILES(); // IO_PlayList.FCONVERT_TO_TEXT_FILES(); // IO_DefPlays.FCONVERT_TO_TEXT_FILES(); // IO_ZoneList.FCONVERT_TO_TEXT_FILES(); MN_PauseScreen.SetActive(false); }