Beispiel #1
0
        //技能装配过程需要等各项资源在Awake方法中创建完毕后才可以开始,所以这里必须使用Start方法
        void Start()
        {
            AssemblePlayerSkillsInfo();

            //成功装配玩家技能信息后,添加技能的事件监听
            CEventDispacher.GetInstance().AddEventListener(CEventType.RELEASE_SKILL, StartSkillStateMachine);
        }
Beispiel #2
0
    public void CastingSkill()
    {
        //高亮标记当前技能的外层背景图片
        IsMarkingOuterImg(true);
        //在此发消息给技能系统
        CBaseEvent cBaseEvent = new CBaseEvent(CEventType.RELEASE_SKILL, this.gameObject);

        CEventDispacher.GetInstance().DispatchEvent(cBaseEvent);
    }
Beispiel #3
0
    public static CEventDispacher GetInstance()
    {
        if (instance == null)
        {
            instance = new CEventDispacher();
        }

        return(instance);
    }
Beispiel #4
0
 void OnDestroy()
 {
     CEventDispacher.GetInstance().RemoveAll();
 }
Beispiel #5
0
 // Use this for initialization
 void Start()
 {
     cEventDispacher = CEventDispacher.GetInstance();
 }