Пример #1
0
        public static void To <R>() where R : Room
        {
            var obj = Objects.Get <O>();

            obj.Remove();

            var room = Rooms.Get <R>();

            ObjectMap.Add(obj, room);
        }
Пример #2
0
        public static void Here()
        {
            var obj = Objects.Get <O>();

            obj.Remove();

            var room = CurrentRoom.Location;

            ObjectMap.Add(obj, room);
        }
Пример #3
0
 public override object GetObjectByKey(Type objectType, object key)
 {
     if (typeof(LiveReport) == objectType)
     {
         LiveReport obj  = null;
         var        data = objectData[(Guid)key];
         if (data != null)
         {
             obj = new LiveReport();
             obj.SetKey((Guid)key);
             obj.SetName(data.Name);
             obj.SetPeriod(data.Period);
             obj.SetStatus(data.Status);
         }
         objectMap.Add(objectType, key, obj);
         return(obj);
     }
     throw new NotImplementedException();
 }
Пример #4
0
 public OilTests()
 {
     Context.Story.Location = Room <DebrisRoom>();
     oil = Objects.Get <PoolOfOil>();
     ObjectMap.Add(oil, Location);
 }
Пример #5
0
 public CommandContext(Assembly assembly)
 {
     ObjectMap.Add(typeof(ICommandContext), this);
     FileName = System.IO.Path.GetFileName(assembly.Location);
 }