94 lines
1.7 KiB
C#
94 lines
1.7 KiB
C#
// ***********************************************************************
|
|
// Assembly : Unity
|
|
// Author : Kimch
|
|
// Created :
|
|
//
|
|
// Last Modified By : Kimch
|
|
// Last Modified On :
|
|
// ***********************************************************************
|
|
// <copyright file= "TutorialAction" company=""></copyright>
|
|
// <summary></summary>
|
|
// ***********************************************************************
|
|
namespace G
|
|
{
|
|
using System.Collections.Generic;
|
|
|
|
public sealed class TutorialAction
|
|
{
|
|
public enum ExecuteType
|
|
{
|
|
kButton = 1,
|
|
kTalk = 2,
|
|
kLevel = 3,
|
|
}
|
|
|
|
private readonly ItemTutorialAction _item;
|
|
|
|
#region Property
|
|
|
|
public ItemTutorialAction item => _item;
|
|
|
|
public int id => _item.id;
|
|
|
|
public int type => _item.type;
|
|
|
|
public int[] typeArgs => _item.typeArgs;
|
|
|
|
public int[] speaker => _item.speaker;
|
|
|
|
public int[] talkings => _item.talkings;
|
|
public int[] hands => _item.hand;
|
|
|
|
public float duration => _item.duration * 0.001f;
|
|
|
|
public float delay => _item.delay * 0.001f;
|
|
|
|
public string button => _item.button;
|
|
|
|
/// <summary>
|
|
/// 暂停游戏
|
|
/// </summary>
|
|
public bool pause
|
|
{
|
|
get { return _item.typeArgs != null && _item.typeArgs.Length > 0 && _item.typeArgs[0] == 1; }
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public object userData
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
#endregion
|
|
|
|
public TutorialAction(ItemTutorialAction item)
|
|
{
|
|
_item = item;
|
|
}
|
|
|
|
#region Method
|
|
|
|
/// <summary>
|
|
/// 执行逻辑
|
|
/// </summary>
|
|
public void OnStart()
|
|
{
|
|
ActionExecutor.Execute(this);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 完成逻辑
|
|
/// </summary>
|
|
public void OnFinish()
|
|
{
|
|
ActionExecutor.Finish(this);
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|