コード例 #1
0
ファイル: MainPanel.cs プロジェクト: kingstop/crashmo
    void addItem(CrashMapData entry, bool self = true)
    {
        ChooseItemEntry temp = CreateItemEntry();
        temp._txt_1.text = entry.MapName;
        temp._txt_2.text = entry.CreaterName;
        System.DateTime time = new System.DateTime(1970, 1, 1).ToLocalTime().AddSeconds(entry.create_time);
        temp._txt_3.text = time.ToString();
        
        MapData temp_ = new MapData();
        temp_.set_info(entry);
        temp.SetTexture(temp_.CreateTexture());
        temp.gameObject.SetActive(true);
		temp.transform.SetParent(_items_container.transform);
        _items.Add(temp);
        if (self)
        {
            temp._map_index = entry.Data.map_index;
        }
        else
        {
            temp._map_index = (ulong)entry.number;
        }
    }