Esempio n. 1
0
 private void DropDeposit(DepositController trade)
 {
     global::RustyCore.Utils.Logger.Info($"DropDeposit {trade.shop.net.ID}");
     m_Boxes.Remove(trade.guid);
     TradeBox.Destroy(trade.guid);
     UnityEngine.Object.DestroyImmediate(trade);
 }
Esempio n. 2
0
 void Unloaded()
 {
     foreach (var trade in m_Boxes)
     {
         TradeBox.Destroy(trade.Key);
         UnityEngine.Object.Destroy(trade.Value, 0.1f);
     }
 }
Esempio n. 3
0
        private DepositController OpenBox(BasePlayer player1, BasePlayer player2)
        {
            var guid  = TradeBox.Create(player1, player2);
            var trade = TradeBox.AddComponent <DepositController>(guid);

            trade.Init(guid, player1, player2);
            global::RustyCore.Utils.Logger.Info($"OpenBox {trade.shop.net.ID}/{player1.displayName}/{player2.displayName}");
            m_Boxes.Add(guid, trade);
            return(trade);
        }