This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ShrinkTutorial
|
||||
{
|
||||
[Serializable]
|
||||
public class ShrinkTutorialStep
|
||||
{
|
||||
[Header("目标定位")]
|
||||
public ShrinkTutorialTargetMode targetMode = ShrinkTutorialTargetMode.None;
|
||||
public string targetPath = string.Empty;
|
||||
public string anchorId = string.Empty;
|
||||
public bool waitForTarget = true;
|
||||
[Min(0f)] public float waitTimeout = 5f;
|
||||
|
||||
[Header("完成条件")]
|
||||
public ShrinkTutorialCompleteCondition completeCondition = ShrinkTutorialCompleteCondition.ClickTarget;
|
||||
public string customEventName = string.Empty;
|
||||
[Min(0f)] public float autoDelay = 0.5f;
|
||||
public string dragTargetAnchorId = string.Empty;
|
||||
|
||||
[Header("文案")]
|
||||
public string localizedTextKey = string.Empty;
|
||||
[TextArea(2, 6)] public string fallbackText = string.Empty;
|
||||
|
||||
[Header("表现")]
|
||||
public ShrinkTutorialDialogAnchor dialogAnchor = ShrinkTutorialDialogAnchor.Auto;
|
||||
public Vector2 dialogOffset = Vector2.zero;
|
||||
public ShrinkTutorialMaskShape maskShape = ShrinkTutorialMaskShape.Rect;
|
||||
[Min(0f)] public float maskPadding = 12f;
|
||||
public bool showArrow = true;
|
||||
|
||||
[Header("信号")]
|
||||
public string enterSignal = string.Empty;
|
||||
public string exitSignal = string.Empty;
|
||||
|
||||
public bool RequiresTarget()
|
||||
{
|
||||
return completeCondition == ShrinkTutorialCompleteCondition.ClickTarget ||
|
||||
completeCondition == ShrinkTutorialCompleteCondition.DragToTarget ||
|
||||
targetMode != ShrinkTutorialTargetMode.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user