예제 #1
0
 public void PlayAction(string action)
 {
     if (!string.IsNullOrEmpty(action))
     {
         mActionStatus.ChangeAction(action, 0);
     }
 }
예제 #2
0
        //-----------------------------------------------------------------------
        void play(IActUnit target, int id)
        {
            if (mActiveStatus != null && mActiveStatus.AIActionCDList.Count != 0)
            {
                foreach (ActData.AIActionCD actionCD in mActiveStatus.AIActionCDList)
                {
                    if (actionCD.ActionCache == id)
                    {
                        ActionInfo actionInfo = new ActionInfo()
                        {
                            ActionID = id, Time = mStatusTime + actionCD.Cd * 0.001f
                        };
                        mActionCDMap.Add(actionInfo);
                        if (mActionCDMap.Count > 1)
                        {
                            mActionCDMap.Sort();
                        }
                        break;
                    }
                }
            }

            if (null != mPlaySkillListener)
            {
                mPlaySkillListener.PlayAISkill(mSkillIDByCurrAction);
            }

            mActionStatus.ChangeAction(id, 0);
        }