//---------Functions prototype-------------- // Use this for initialization void Start() { //Screen.lockCursor = true; SSOA = gameObject.GetComponent <SSAOEffect>(); DFPS = gameObject.GetComponent <DisplayFPS>(); GameMode = PlayerPrefs.GetInt("GameMode"); SSOA_mode = PlayerPrefs.GetInt("SSOA"); //if (GameMode == 0) //{ // Greta = GameObject.FindGameObjectWithTag("Greta"); // Greta_Position_X = -750.0f; // Greta_Position_Y = -187.6466f; // Greta_Position_Z = -970.0f; // Vector3 pos = new Vector3(Greta_Position_X, Greta_Position_Y + 0.5f, Greta_Position_Z); // Greta.transform.position = pos; //} if (GameMode == 2) { Greta = GameObject.FindGameObjectWithTag("Greta"); Greta_Position_X = PlayerPrefs.GetFloat("loadP_X"); Greta_Position_Y = PlayerPrefs.GetFloat("loadP_Y"); Greta_Position_Z = PlayerPrefs.GetFloat("loadP_Z"); Vector3 pos = new Vector3(Greta_Position_X, Greta_Position_Y + 0.5f, Greta_Position_Z); Greta.transform.position = pos; print(Greta_Position_X.ToString() + ", " + Greta_Position_Y.ToString() + ", " + Greta_Position_Z.ToString()); } if (SSOA_mode != 0) { //SSOA.active = true; SSOA.enabled = true; switch (SSOA_mode) { case 1: SSOA.m_SampleCount = SSAOEffect.SSAOSamples.Low; break; case 2: SSOA.m_SampleCount = SSAOEffect.SSAOSamples.Medium; break; case 3: SSOA.m_SampleCount = SSAOEffect.SSAOSamples.High; break; default: break; } } else { //SSOA.active = false; SSOA.enabled = false; } }
// Start is called before the first frame update private void Start() { DisplayFPS displayFPS = GetComponent <DisplayFPS>(); if (displayFPS != null) { displayFPS.AppendExtendString += AppendExtendStringCB; } }
private void OnDestroy() { DisplayFPS displayFPS = GetComponent <DisplayFPS>(); if (displayFPS != null) { displayFPS.AppendExtendString -= AppendExtendStringCB; } }
//---------Functions prototype-------------- // Use this for initialization void Start() { //Screen.lockCursor = true; SSOA = gameObject.GetComponent<SSAOEffect>(); DFPS = gameObject.GetComponent<DisplayFPS>(); GameMode = PlayerPrefs.GetInt("GameMode"); SSOA_mode = PlayerPrefs.GetInt("SSOA"); //if (GameMode == 0) //{ // Greta = GameObject.FindGameObjectWithTag("Greta"); // Greta_Position_X = -750.0f; // Greta_Position_Y = -187.6466f; // Greta_Position_Z = -970.0f; // Vector3 pos = new Vector3(Greta_Position_X, Greta_Position_Y + 0.5f, Greta_Position_Z); // Greta.transform.position = pos; //} if (GameMode == 2) { Greta = GameObject.FindGameObjectWithTag("Greta"); Greta_Position_X = PlayerPrefs.GetFloat("loadP_X"); Greta_Position_Y = PlayerPrefs.GetFloat("loadP_Y"); Greta_Position_Z = PlayerPrefs.GetFloat("loadP_Z"); Vector3 pos = new Vector3(Greta_Position_X, Greta_Position_Y + 0.5f, Greta_Position_Z); Greta.transform.position = pos; print(Greta_Position_X.ToString() + ", " + Greta_Position_Y.ToString() + ", " + Greta_Position_Z.ToString()); } if (SSOA_mode != 0) { //SSOA.active = true; SSOA.enabled = true; switch (SSOA_mode) { case 1: SSOA.m_SampleCount = SSAOEffect.SSAOSamples.Low; break; case 2: SSOA.m_SampleCount = SSAOEffect.SSAOSamples.Medium; break; case 3: SSOA.m_SampleCount = SSAOEffect.SSAOSamples.High; break; default: break; } } else //SSOA.active = false; SSOA.enabled = false; }
private void OnDisable() { DisplayFPS displayFPS = GetComponent <DisplayFPS>(); if (displayFPS) { displayFPS.AppendExtendString -= AppendExtendStringCB; } if (!CollisionManager.IsApplicationIsQuitting() && (CollisionManager.Instance != null)) { CollisionManager.Instance.m_releaseEventHandler -= ProcessTouchRelease; CollisionManager.Instance.m_moveEventHandler -= ProcessTouchMove; CollisionManager.Instance.m_pressEventHandler -= ProcessTouchPress; } }
private void OnEnable() { m_selfTransform = transform; if (m_useBornInfo) { m_selfTransform.position = m_bornPosition; m_selfTransform.localEulerAngles = m_rotation; } if (CollisionManager.Instance != null) { CollisionManager.Instance.m_pressEventHandler += ProcessTouchPress; CollisionManager.Instance.m_moveEventHandler += ProcessTouchMove; CollisionManager.Instance.m_releaseEventHandler += ProcessTouchRelease; } DisplayFPS displayFPS = GetComponent <DisplayFPS>(); if (displayFPS) { displayFPS.AppendExtendString += AppendExtendStringCB; } }
// Use this for initialization void Start() { fps = new DisplayFPS(); }