Exemple #1
0
        public Character Clone()
        {
            Character clone = new Character(Name, X, Y);

            clone.Hidden = Hidden;
            foreach (CharacterGoal goal in Goals)
            {
                clone.Goals.Add(goal);
            }

            clone.SetAction(nextAction);

            foreach (KeyValuePair <string, feelingsAboutChar> kvp in Relationships)
            {
                clone.AddRelationship(kvp.Key, kvp.Value);
            }

            foreach (Item item in Items)
            {
                clone.Items.Add(item.Clone());
            }

            foreach (string status in this.Statuses)
            {
                clone.AddStatus(status);
            }

            return(clone);
        }
Exemple #2
0
    public Character Clone(){
      Character clone = new Character (Name, X, Y);
      clone.Hidden = Hidden;
      foreach (CharacterGoal goal in Goals) {
        clone.Goals.Add(goal);			
      }

      clone.SetAction (nextAction);

      foreach (KeyValuePair<string, feelingsAboutChar> kvp in Relationships) {
	clone.AddRelationship(kvp.Key,kvp.Value);			
      }

      foreach (Item item in Items) {
	clone.Items.Add(item.Clone());			
      }

      foreach (string status in this.Statuses) {
		clone.AddStatus(status);
      }

      return clone;
    }