Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEngine.UI;
- public class RadialMenuElement : InterfaceElement
- {
- public RectTransform myRect;
- public Image myImage;
- public Outline myOutline;
- public void StartElement(Vector2 outlineSize, float zRotation, Vector3 position, float fillAmount)
- {
- myRect.position = position;
- myOutline.effectDistance = outlineSize;
- myImage.fillAmount = fillAmount/360f;
- myRect.rotation = Quaternion.Euler(new Vector3(0,0,zRotation));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement