Beispiel #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="list">The hero event to construct.</param>
 public HeroEvent(HeroEvent field)
 {
     name            = field.name;
     visible         = field.visible;
     actions         = new List <HeroAction>(field.actions.Select(x => x.Clone(x)));
     eventType       = field.eventType;
     messageSettings = field.messageSettings;
     messageTag      = field.messageTag;
     messenger       = field.messenger;
     currentPosition = field.currentPosition;
     waiting         = field.waiting;
     intConditions   = new List <ConditionIntFields>(field.intConditions.Select(x => x.Clone(x)));
     boolConditions  = new List <ConditionBoolFields>(field.boolConditions.Select(x => x.Clone(x)));
     inputConditions = new List <ConditionInputList>(field.inputConditions.Select(x => x.Clone(x)));
 }
Beispiel #2
0
        // --------------------------------------------------------------
        // Methods
        // --------------------------------------------------------------

        /// <summary>
        /// Clone the hero event, remove references.
        /// </summary>
        /// <param name="field">The hero event to clone.</param>
        /// <returns>The cloned hero event.</returns>
        public HeroEvent Clone(HeroEvent field)
        {
            HeroEvent temp = new HeroEvent();

            temp.name            = field.name;
            temp.visible         = field.visible;
            temp.actions         = new List <HeroAction>(field.actions.Select(x => x.Clone(x)));
            temp.eventType       = field.eventType;
            temp.messageSettings = field.messageSettings;
            temp.messageTag      = field.messageTag;
            temp.messenger       = field.messenger;
            temp.currentPosition = field.currentPosition;
            temp.waiting         = field.waiting;
            temp.intConditions   = new List <ConditionIntFields>(field.intConditions.Select(x => x.Clone(x)));
            temp.boolConditions  = new List <ConditionBoolFields>(field.boolConditions.Select(x => x.Clone(x)));
            temp.inputConditions = new List <ConditionInputList>(field.inputConditions.Select(x => x.Clone(x)));
            return(temp);
        }