コード例 #1
0
        /// <summary>
        /// Adds an Action to the QuestPart that will be performed once the QuestPart fires
        /// </summary>
        /// <param name="action"></param>
        public void AddAction(IBehaviourAction action)
        {
            if (actions == null)
            {
                actions = new List <IBehaviourAction>();
            }

            actions.Add(action);
        }
コード例 #2
0
        /// <summary>
        /// Adds an Action to the QuestPart that will be performed once the QuestPart fires
        /// </summary>
        /// <param name="actionType">ActionType</param>
        /// <param name="p">First Action Variable, meaning depends on ActionType</param>
        /// <param name="q">Second Action Variable, meaning depends on ActionType</param>
        public void AddAction(eActionType actionType, Object p, Object q)
        {
            IBehaviourAction action = null;

            Type type = BehaviourMgr.GetTypeForActionType(actionType);

            if (type != null)
            {
                action = (IBehaviourAction)Activator.CreateInstance(type, new object[] { this.NPC, p, q });
                AddAction(action);
            }
            else
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("No registered action found for ActionType " + actionType);
                }
            }
        }
コード例 #3
0
ファイル: BaseBehaviour.cs プロジェクト: mynew4/DAoC
 /// <summary>
 /// Adds an Action to the QuestPart that will be performed once the QuestPart fires
 /// </summary>
 /// <param name="action"></param>
 public void AddAction(IBehaviourAction action)
 {
     if (actions == null)
         actions = new List<IBehaviourAction>();
     
     actions.Add(action);
 }