Delete() public method

public Delete ( ) : void
return void
示例#1
0
            protected override void OnTick()
            {
                BaseHouse house = m_Inventory.House;

                if (house != null)
                {
                    if (m_Inventory.Currency > 0)
                    {
                        if (house.MovingCrate == null)
                        {
                            house.MovingCrate = new MovingCrate(house);
                        }

                        Banker.Deposit(house.MovingCrate, m_Inventory.TypeOfCurrency, m_Inventory.Currency);
                    }

                    foreach (Item item in m_Inventory.Items.Where(item => !item.Deleted))
                    {
                        house.DropToMovingCrate(item);
                    }

                    m_Inventory.Currency = 0;
                    m_Inventory.Items.Clear();
                }

                m_Inventory.Delete();
            }
            protected override void OnTick()
            {
                BaseHouse house = m_Inventory.House;

                if (house != null)
                {
                    if (m_Inventory.Gold > 0)
                    {
                        if (house.MovingCrate == null)
                        {
                            house.MovingCrate = new MovingCrate(house);
                        }

                        Banker.Deposit(house.MovingCrate, m_Inventory.Gold);
                    }

                    foreach (Item item in m_Inventory.Items)
                    {
                        if (!item.Deleted)
                        {
                            house.DropToMovingCrate(item);
                        }
                    }

                    m_Inventory.Gold = 0;
                    m_Inventory.Items.Clear();
                }

                m_Inventory.Delete();
            }
示例#3
0
            protected override void OnTick()
            {
                BaseHouse house = m_Inventory.House;

                if (house != null)
                {
                    m_Inventory.Gold = 0;
                    m_Inventory.Items.Clear();
                }

                m_Inventory.Delete();
            }