private void Start() { cc = GetComponent <CheckControllers>(); if (cc.GetControllerOneState()) { es.SetSelectedGameObject(menuButtons[0]); } }
void Start() { //Set "Quit" popup inactive popup.gameObject.SetActive(false); //Detect controller connection & if connected, set selected button checkControllers = GetComponent <CheckControllers>(); if (checkControllers.GetControllerOneState()) { es.SetSelectedGameObject(menuButtons[0].gameObject); } }
void Start() { rb = GetComponent <Rigidbody>(); animator = GetComponent <Animator>(); checkControllers = gameManager.GetComponent <CheckControllers>(); col = GetComponent <CapsuleCollider>(); stun = GetComponentInChildren <ParticleSystemRenderer>(); speed = moveSpeed; jumpH = jumpHeight; move = true; }
void Start() { pause = gameManager.GetComponent <PauseMenu>(); checkControllers = gameManager.GetComponent <CheckControllers>(); //audioSource = GetComponent<AudioSource>(); p2Controller = checkControllers.GetControllerTwoState(); //Screen size CanvasScaler scaler = controllerCursor.GetComponentInParent <CanvasScaler>(); float expectedAspectRatio = scaler.referenceResolution.x / scaler.referenceResolution.y; float aspectRatio = (float)Screen.width / (float)Screen.height; screenWidth = (aspectRatio / expectedAspectRatio) * (scaler.referenceResolution.x / 2); screenHeight = scaler.referenceResolution.y / 2; }
void Start() { //Get references pause = gameManager.GetComponent <PauseMenu>(); cs = GetComponent <CastSpell>(); audioSource = GetComponent <AudioSource>(); //Queue Initialization queue = new List <GameObject>(); cursorMove = GetComponent <MoveControllerCursor>(); active = true; CreateTrapQueue(); trapQueue.transform.SetAsLastSibling(); //Handle cursor or set buttons if controller connected checkControllers = gameManager.GetComponent <CheckControllers>(); p2Controller = checkControllers.GetControllerTwoState(); placeEnabled = true; if (p2Controller) { eventSystem.SetSelectedGameObject(queue[0].gameObject); } }