//技能装配过程需要等各项资源在Awake方法中创建完毕后才可以开始,所以这里必须使用Start方法 void Start() { AssemblePlayerSkillsInfo(); //成功装配玩家技能信息后,添加技能的事件监听 CEventDispacher.GetInstance().AddEventListener(CEventType.RELEASE_SKILL, StartSkillStateMachine); }
public void CastingSkill() { //高亮标记当前技能的外层背景图片 IsMarkingOuterImg(true); //在此发消息给技能系统 CBaseEvent cBaseEvent = new CBaseEvent(CEventType.RELEASE_SKILL, this.gameObject); CEventDispacher.GetInstance().DispatchEvent(cBaseEvent); }
void OnDestroy() { CEventDispacher.GetInstance().RemoveAll(); }
// Use this for initialization void Start() { cEventDispacher = CEventDispacher.GetInstance(); }