Beispiel #1
0
    /// <summary>
    /// 更新Item上显示的信息
    /// </summary>
    /// <param name="go">被更新的对象</param>
    void UpdateItemInfo(GameObject go)
    {
        AuctionItem item = go.GetComponent <AuctionItem>();

        if (item.gameObject.activeSelf)
        {
            int index = int.Parse(item.gameObject.name);
            item.AuctionID = int.Parse(aucTable[index]["id"].YuanColumnText);
            item.SetItemIcon(aucTable[index]["ItemID"].YuanColumnText);
            item.SetPrice(aucTable[index]["AuctionPrice"].YuanColumnText);
            //int lastTime = int.Parse(aucTable[index]["AuctionTime"].YuanColumnText) - (int)((DateTime.Now - DateTime.Parse(aucTable[index]["StartTime"].YuanColumnText)).TotalSeconds);
            int lastTime = int.Parse(aucTable[index]["AuctionTime"].YuanColumnText) - (int)((InRoom.GetInRoomInstantiate().serverTime - DateTime.Parse(aucTable[index]["StartTime"].YuanColumnText)).TotalSeconds);
            item.RefreshTime(lastTime);
        }
    }