1. Create a skill editing window under the Editor and save the skill data in Json
2. Run the game to load the skill Json file and save it in Mgr
3. Click to send a message AnimMgr EffectMgr accept the message to change the animation generation skill
Skill editing under Editor
AnimMgr
EffectMgr
The track where the character puts his skills
Skill delayed coroutine tool
int id = 0;
Dictionary<int ,Coroutine >dic=new Dictionary<int, Coroutine> ();
public void AddSchedule(MonoBehaviour self,float time,Action<object> action, params object[] arr)
{
int name = id++;
Coroutine coroutine = self.StartCoroutine(DelayFun(self,name,time,action,arr));
dic.Add(name,coroutine);
}
//协程函数
IEnumerator DelayFun(MonoBehaviour self, int name, float time, Action<object> action, params object[] arr)
{
yield return new WaitForSeconds(time);
action(arr);
self.StopCoroutine(dic[name]);
}