Ejemplo n.º 1
0
        internal void EndBattle(int exp, int ap, int gil, List <IInventoryItem> items)
        {
            if (State != _battleState)
            {
                throw new ImplementationException("Cannot go to Post-Battle state except from Battle state");
            }

            _postBattleState = new PostBattleState(this, exp, ap, gil, items);
            _postBattleState.Init();

            _battleState.Dispose();

            SetState(_postBattleState);
        }
Ejemplo n.º 2
0
        public void TestPostBattleState()
        {
            int exp = 50000;
            int ap  = 150000;
            int gil = 100000;

            System.Collections.Generic.List <IInventoryItem> items = new System.Collections.Generic.List <IInventoryItem>();
//            items.Add(Item.GetItem("titanbangle", InventoryItemType.armor));
//            items.Add(Item.GetItem("titanbangle", InventoryItemType.armor));
//            items.Add(Item.GetItem("fairytale", InventoryItemType.weapon));

            _postBattleState = new PostBattleState(this, exp, ap, gil, items);
            _postBattleState.Init();
            SetState(_postBattleState);
        }