Ejemplo n.º 1
0
        // Copy trait and keep trait type id to identify it as the same relationship elsewhere in the program
        public Relationship(Relationship anotherRel, StoryEntity originatingEntity, StoryData world)
        {
            UInt64 nullTargetId = 0;

            if (originatingEntity.GetType() == typeof(Character))
            {
                nullTargetId = Character.getNoOneCharacter().Id;
            }
            else if (originatingEntity.GetType() == typeof(Environment))
            {
                nullTargetId = Environment.getNoWhereEnvironment().Id;
            }

            Constructor(anotherRel.Name, originatingEntity.Id, nullTargetId, 0.0, anotherRel.TypeId, world);
        }
Ejemplo n.º 2
0
 public Character findCharacterById(UInt64 id)
 {
     if (id == NullCharacterId)
     {
         return(Character.getNoOneCharacter());
     }
     foreach (Character item in _characters)
     {
         if (item.Id == id)
         {
             return(item);
         }
     }
     return(null);
 }
Ejemplo n.º 3
0
        public static List <Character> getCharactersWithNoOne()
        {
            if (_storyWorld == null)
            {
                return(new List <Character>());
            }
            else
            {
                Character        NoOne        = Character.getNoOneCharacter();
                List <Character> charList     = _storyWorld.Characters;
                List <Character> fullCharList = new List <Character>();

                fullCharList.AddRange(charList);
                fullCharList.Add(NoOne);

                return(fullCharList);
            }
        }