public void SetupMenu(List <RightClickMenuItem> items, IBranchPosition branchPosition) { Items = items; radialBranch.SetupAndEnable((RectTransform)ItemRadial.transform, ItemRadial.OuterRadius, ItemRadial.Scale, branchPosition); ItemRadial.SetupWithItems(items); ItemRadial.CenterItemsTowardsAngle(Items.Count, radialBranch.GetBranchToTargetAngle()); this.SetActive(true); ItemRadial.SetActive(true); ActionRadial.Setup(0); ActionRadial.SetActive(false); }
public void SetupMenu(List <RightClickMenuItem> items, Vector3 worldPosition, bool followWorldPosition) { Items = items; radialBranch.Setup(worldPosition, itemRadialPrefab.OuterRadius, itemRadialPrefab.Scale, followWorldPosition); ItemRadial.SetupWithItems(items); ItemRadial.transform.localPosition = radialBranch.MenuPosition; UpdateItemRadialRotation(); this.SetActive(true); ItemRadial.SetActive(true); ActionRadial.Setup(0); ActionRadial.SetActive(false); }