mirror of
https://github.com/peng-zhihui/ElectronBot.git
synced 2026-10-22 15:16:22 +08:00
14 lines
397 B
C#
14 lines
397 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using UnityEngine.UI.ProceduralImage;
|
|
|
|
[ModifierID("Round")]
|
|
public class RoundModifier : ProceduralImageModifier {
|
|
#region implemented abstract members of ProceduralImageModifier
|
|
public override Vector4 CalculateRadius (Rect imageRect){
|
|
float r = Mathf.Min (imageRect.width,imageRect.height)*0.5f;
|
|
return new Vector4 (r,r,r,r);
|
|
}
|
|
#endregion
|
|
}
|