public void SetPlayerPanelOrientation(PlayerPanelOrientation orientation) { if ((int)orientation != 4) { for (int i = 0; i < PlayerUI.Length; i++) { var rectP = PlayerUI[i].GetComponent <RectTransform>(); rectP.pivot = 0.5f * Vector2.one; } } SetPlayerPanelParent(PlayerPanelPositions[(int)orientation - 1]); if ((int)orientation == 4) { for (int i = 0; i < PlayerUI.Length; i++) { var rectP = PlayerUI[i].GetComponent <RectTransform>(); rectP.anchorMin = CornerOrientationAnchorValues[i]; rectP.anchorMax = CornerOrientationAnchorValues[i]; rectP.pivot = CornerOrientationAnchorValues[i]; rectP.anchoredPosition = Vector3.zero; } } }
public PlayerPanelInfo(PlayerPanelOrientation _orientation, ObjectiveItem _item) { _playerPanel = _orientation; _objectiveItem = _item; }