Example #1
0
        public Zone(RealmInfomation[] realm_infomations)
        {
            this._Realms = new Dictionary<string, Realm>();
            _Updater = new TimesharingUpdater(1f/10f);
            if (realm_infomations == null)
                throw new System.NullReferenceException();

            foreach (var realm_infomation in realm_infomations)
            {
                var realm = new Realm(realm_infomation);
                this._Realms.Add(realm_infomation.Name, realm);
                _Updater.Add(realm);
            }
        }
 private void _GetMap(Realm.Map obj)
 {
     _Map = obj;
     _Binder.Bind<IJumpMap>(this);
 }
Example #3
0
        private void _ToGame(GamePlayerRecord record , Realm.Map map)
        {
            var player = EntityProvider.Create(record.Entity);

            var itemProvider = new ItemProvider();
            var itemAxe = itemProvider.MakeItem( "Axe1" , 0.5f );
            var itemSword1 = itemProvider.MakeItem("Sword1" , 0.5f);
            var itemSword2 = itemProvider.MakeItem("Sword2" , 0.5f);
            var itemShield1 = itemProvider.MakeItem("Shield1", 0.5f);

            player.Bag.Add(itemAxe);
            player.Bag.Add(itemSword1);
            player.Bag.Add(itemSword2);
            player.Bag.Add(itemShield1);

            foreach (var item in record.Items)
            {
                player.Bag.Add(item);
            }

            var stage = new GameStage(this._Binder, map.Finder, map.Gate, player);
            stage.ExitEvent += () => { };
            stage.TransmitEvent += _ToRealm;
            _Machine.Push(stage);
        }