1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| using System.Collections.Generic;
| using UnityEngine;
| using UnityEngine.Sprites;
| using UnityEngine.UI;
|
| //引导用的圆形镂空图
| public class GuideCircleHollowImage : CircleHollowImage
| {
|
| public override bool IsRaycastLocationValid(Vector2 screenPoint, Camera eventCamera)
| {
| return true;
|
| }
|
| //是否在镂空圈内
| public bool IsInCirleArea(Vector2 screenPoint, Camera eventCamera)
| {
| Vector2 local;
| RectTransformUtility.ScreenPointToLocalPointInRectangle(image.rectTransform, screenPoint, eventCamera, out local);
| return !Contains(local, outterVertices, innerVertices);
| }
|
|
| }
|
|