,
分享一个引导功能
public void Guide(Canvas canvas, RectTransform target, GuideType guideType,TranslateType translateType = TranslateType.Direct,float time = 1) {
Guide(target, guideType);
switch (guideType)
{
case GuideType.Rect:
rectGuide.Guide(canvas, target,translateType,time);
break;
case GuideType.Circle:
circleGuide.Guide(canvas, target,translateType, time);
break;
}
}
public void Guide(Canvas canvas, RectTransform target, GuideType guideType,float scale,float time, TranslateType translateType = TranslateType.Direct, float moveTime = 1) {
Guide(target, guideType);
switch (guideType)
{
case GuideType.Rect:
rectGuide.Guide(canvas, target,scale,time,translateType,moveTime);
break;
case GuideType.Circle:
circleGuide.Guide(canvas, target,scale,time, translateType, moveTime);
break;
}
}
/// <summary>
/// canvas
/// btn2 下一个遮罩位置.
/// GuideType.Circle 遮罩方式 0矩形 1圆形
/// 1 时间
/// </summary>
public void OnButton1Click()
{
guideController.Guide(canvas, btn2, GuideType.Circle, 50, 2);
}
下载链接
|