82 lines
1.7 KiB
C#
82 lines
1.7 KiB
C#
using QFramework;
|
|
using QFramework.Example;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
namespace QFramework
|
|
{
|
|
|
|
public class GuideTipAction : IAction
|
|
{
|
|
public System.Action OnFinished
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public ulong ActionID
|
|
{
|
|
get; set;
|
|
}
|
|
public ActionStatus Status
|
|
{
|
|
get; set;
|
|
}
|
|
public bool Deinited
|
|
{
|
|
get; set;
|
|
}
|
|
public bool Paused
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
private GuideTipAction()
|
|
{
|
|
}
|
|
|
|
private static readonly SimpleObjectPool<GuideTipAction> mPool =
|
|
new SimpleObjectPool<GuideTipAction>(() => new (), null, 10);
|
|
Dictionary<string, string> datas;
|
|
|
|
public static GuideTipAction Allocate( Dictionary<string, string> datas, System.Action onDelayFinish = null)
|
|
{
|
|
var retNode = mPool.Allocate();
|
|
retNode.ActionID = ActionKit.ID_GENERATOR++;
|
|
retNode.Deinited = false;
|
|
retNode.Reset();
|
|
retNode.datas = datas;
|
|
return retNode;
|
|
}
|
|
|
|
public void Deinit()
|
|
{
|
|
if (!Deinited)
|
|
{
|
|
Deinited = true;
|
|
mPool.Recycle(this);
|
|
}
|
|
}
|
|
|
|
public void OnExecute(float dt)
|
|
{
|
|
}
|
|
|
|
public void OnFinish()
|
|
{
|
|
}
|
|
|
|
public void OnStart()
|
|
{
|
|
UIGuideTipData data = new UIGuideTipData();
|
|
|
|
data.targets = datas.ContainsKey("targetName") ? datas["targetName"] : string.Empty;
|
|
|
|
|
|
|
|
}
|
|
|
|
public void Reset()
|
|
{
|
|
}
|
|
}
|
|
} |