private void Awake() { if (!Instance) { Instance = this; } }
// Use this for initialization void Awake() { tr = GetComponent <Transform>(); instance = this; Camera.main.orthographicSize = needWidth / Screen.width * Screen.height; cameraPos = 0; }
// Use this for initialization void Awake() { tr = GetComponent<Transform>(); instance = this; Camera.main.orthographicSize = needWidth / Screen.width * Screen.height; cameraPos = 0; }
void Awake() { cameraCurrMode = GameObject.Find("Main Camera").GetComponent <CameraScr>(); m_View = transform.Find("View").gameObject; m_View.GetComponent <Button>().onClick.AddListener(ViewButton); m_Punch = transform.Find("Punch").gameObject; m_Punch.GetComponent <Button>().onClick.AddListener(PunchButton); }
private void Awake() { animator = GetComponent <Animator>(); animator.SetInteger("State", (int)Behaviour.Arise); camera = GameObject.Find("Main Camera").GetComponent <CameraScr>(); JoystickMgr jsMgr = GameObject.Find("PanelJoystick").GetComponent <JoystickMgr>(); jsMgr.eventStickDown += OnStickDown; jsMgr.eventStickUp += OnStickUp; ButtonScr buttonScr = GameObject.Find("PanelUtility").GetComponent <ButtonScr>(); buttonScr.eventPunch += PunchAnim; }
void Awake() { camscr = this; gameObject.GetComponent <Camera>().orthographicSize = Screen.height / Zoom; }