Пример #1
0
        public IEventExtender Create(MapExtender map, XleEvent evt, Type defaultExtender)
        {
            // It looks like defaultExtender is no longer required.
            // That would have some cascading refactoring, removing
            // all the overrides of ExtenderType for different event types.
            var result = serviceLocator.ResolveNamed <IEventExtender>(evt.ExtenderName);

            ((EventExtender)result).TheEvent = evt;

            return(result);
        }
Пример #2
0
        protected async Task <bool> OpenEvent()
        {
            foreach (var evt in MapExtender.EventsAt(1).Where(x => x.Enabled))
            {
                if (await evt.Open())
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #3
0
        private T Resolve <T>(MapExtender map, string name) where T : IXleMapRenderer
        {
            T result;

            if (name == null)
            {
                result = serviceLocator.Resolve <T>();
            }
            else
            {
                result = serviceLocator.ResolveNamed <T>(name);
            }

            result.TheMap = map.TheMap;
            return(result);
        }
Пример #4
0
 private DungeonMonster MonsterInFrontOfPlayer(Player player, ref int distance)
 {
     return(MapExtender.MonsterInFrontOfPlayer(player, ref distance));
 }
Пример #5
0
 public TempleRenderer TempleRenderer(MapExtender map, string name = null)
 => Resolve <TempleRenderer>(map, name);
Пример #6
0
 public TownRenderer TownRenderer(MapExtender map, string name = null)
 => Resolve <TownRenderer>(map, name);
Пример #7
0
 public OutsideRenderer OutsideRenderer(MapExtender map, string name = null)
 => Resolve <OutsideRenderer>(map, name);
Пример #8
0
 public IMuseumRenderer MuseumRenderer(MapExtender map, string name = null)
 => Resolve <IMuseumRenderer>(map, name);
Пример #9
0
 public DungeonRenderer DungeonRenderer(MapExtender map, string name = null)
 => Resolve <DungeonRenderer>(map, name);
Пример #10
0
 public CastleRenderer CastleRenderer(MapExtender map, string name = null)
 => Resolve <CastleRenderer>(map, name);
Пример #11
0
        public override async Task <bool> StepOn()
        {
            await MapExtender.LeaveMap();

            return(true);
        }