private void Start() { var scale = ( ( Screen.width > Screen.height ) ? Screen.height : Screen.width ) * 0.001f; var screenOffset = new Vector3( ( Screen.width * .5f ) - ( ( 520f * .5f ) * scale ), ( Screen.height * .5f ) - ( ( 220f * .5f ) * scale ), 0 ); _guiMatrix = Matrix4x4.TRS( screenOffset, Quaternion.identity, new Vector3( scale, scale, 1 ) ); _endLevel = GetComponent< EndLevelEvent >(); _texture = _endLevel.GetPixelTexture(); }
/// <summary> /// Called before first frame Update /// </summary> protected virtual void Start() { // add self as invoker of End Level event endLevelEvent = new EndLevelEvent(); EventManager.AddEndLevelInvoker(this); }
void onPlayerFinish(EndLevelEvent e) { Instantiate(endMenuPrefab); }
void onPlayerFinish(EndLevelEvent e) { _pauseButton.gameObject.SetActive(false); }