Exemple #1
0
        protected virtual ListView <Action> PlayAgeActionShared(AreaEventTrigger.EActTiming inTiming, AreaEventTrigger.STimingAction[] inTimingActs, ActionStopDelegate inCallback, ListView <Action> outDuraActs, GameObject inSrc, GameObject inAtker)
        {
            ListView <Action> listView = new ListView <Action>();

            for (int i = 0; i < inTimingActs.Length; i++)
            {
                AreaEventTrigger.STimingAction sTimingAction = inTimingActs[i];
                if (sTimingAction.Timing == inTiming)
                {
                    ActionStopDelegate actionStopDelegate = null;
                    if (inTiming == AreaEventTrigger.EActTiming.EnterDura)
                    {
                        actionStopDelegate = inCallback;
                    }
                    Action action = TriggerActionAge.PlayAgeActionShared(sTimingAction.ActionName, sTimingAction.HelperName, inSrc, inAtker, sTimingAction.HelperIndex, inCallback);
                    if (action != null)
                    {
                        listView.Add(action);
                        if (actionStopDelegate != null)
                        {
                            outDuraActs.Add(action);
                        }
                    }
                }
            }
            return(listView);
        }
        protected override ListView <Action> PlayAgeActionShared(AreaEventTrigger.EActTiming inTiming, AreaEventTrigger.STimingAction[] inTimingActs, ActionStopDelegate inCallback, ListView <Action> outDuraActs, GameObject inSrc, GameObject inAtker)
        {
            ListView <Action> listView       = new ListView <Action>();
            CRoleInfo         masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo != null)
            {
                int iMobaLevel = masterRoleInfo.acntMobaInfo.iMobaLevel;
                if (inTimingActs.Length > iMobaLevel)
                {
                    AreaEventTrigger.STimingAction sTimingAction      = inTimingActs[iMobaLevel];
                    ActionStopDelegate             actionStopDelegate = null;
                    if (inTiming == AreaEventTrigger.EActTiming.EnterDura)
                    {
                        actionStopDelegate = inCallback;
                    }
                    Action action = TriggerActionAge.PlayAgeActionShared(sTimingAction.ActionName, sTimingAction.HelperName, inSrc, inAtker, sTimingAction.HelperIndex, inCallback);
                    if (action != null)
                    {
                        listView.Add(action);
                        if (actionStopDelegate != null)
                        {
                            outDuraActs.Add(action);
                        }
                    }
                }
            }
            return(listView);
        }
Exemple #3
0
        private static ListView <AGE.Action> PlayAgeActionShared(AreaEventTrigger.EActTiming inTiming, AreaEventTrigger.STimingAction[] inTimingActs, ActionStopDelegate inCallback, ListView <AGE.Action> outDuraActs, GameObject inSrc, GameObject inAtker)
        {
            ListView <AGE.Action> view = new ListView <AGE.Action>();

            foreach (AreaEventTrigger.STimingAction action in inTimingActs)
            {
                if (action.Timing == inTiming)
                {
                    ActionStopDelegate delegate2 = null;
                    if (inTiming == AreaEventTrigger.EActTiming.EnterDura)
                    {
                        delegate2 = inCallback;
                    }
                    AGE.Action item = PlayAgeActionShared(action.ActionName, action.HelperName, inSrc, inAtker, action.HelperIndex, inCallback);
                    if (item != null)
                    {
                        view.Add(item);
                        if (delegate2 != null)
                        {
                            outDuraActs.Add(item);
                        }
                    }
                }
            }
            return(view);
        }
Exemple #4
0
 public override void OnRelease()
 {
     this.SkillID    = 0;
     this.ActionName = string.Empty;
     this.curAction.Release();
     this.OnActionStopDelegate = null;
     base.OnRelease();
 }
Exemple #5
0
 public override void OnUse()
 {
     base.OnUse();
     this.SkillID    = 0;
     this.ActionName = string.Empty;
     this.curAction.Release();
     this.skillContext.Reset();
     this.bAgeImmeExcute       = false;
     this.OnActionStopDelegate = new ActionStopDelegate(this.OnActionStoped);
 }
Exemple #6
0
 protected static Action PlayAgeActionShared(string inActionName, string inHelperName, GameObject inSrc, GameObject inAtker, int inHelperIndex = -1, ActionStopDelegate inCallback = null)
 {
     return(DialogueProcessor.PlayAgeAction(inActionName, inHelperName, inSrc, inAtker, inCallback, inHelperIndex));
 }