// Update is called once per frame void Update() { if (m_input.SELECT_pressed) { sui = (SystemUsingInput)(((int)sui + 1) % 2); bool showCanvas = sui == SystemUsingInput.InventoryMenu; inventoryCanvas.SetActive(showCanvas); mainCamera.orthographic = !showCanvas; playerCharacter.GetComponent <PlayerController>().ChangeInputLock(); inventoryCanvas.GetComponent <InventoryCanvasController>().ChangeInputLock(); //layerManager.SetActive(!showCanvas); platformSystem.SetActive(!showCanvas); playerCharacter.SetActive(!showCanvas); } }
// Start is called before the first frame update void Start() { sui = SystemUsingInput.PlayerController; PlayerStartPos = playerCharacter.transform.position; }