// *********************************************************************** // Assembly : Unity // Author : Kimch // Created : // // Last Modified By : Kimch // Last Modified On : // *********************************************************************** // // // *********************************************************************** 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; /// /// 暂停游戏 /// public bool pause { get { return _item.typeArgs != null && _item.typeArgs.Length > 0 && _item.typeArgs[0] == 1; } } /// /// /// public object userData { get; set; } #endregion public TutorialAction(ItemTutorialAction item) { _item = item; } #region Method /// /// 执行逻辑 /// public void OnStart() { ActionExecutor.Execute(this); } /// /// 完成逻辑 /// public void OnFinish() { ActionExecutor.Finish(this); } #endregion } }