Пример #1
0
    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;
        }
    }
Пример #2
0
    public void PlayClick()
    {
        global_instance.Instance._global_game_type = global_game_type.global_game_type_game;
        message.CrashMapData MapDataTemp = null;
        if (_current_page == page_type.page_type_official)
        {
			MapDataTemp = global_instance.Instance._officilMapManager.getOfficilMap(_chapter_id, (int)_current_map_index);
        }
        else
        {
            MapDataTemp = GetCurrentSelectMapData();
        }
        
        if(MapDataTemp != null)
        {
            MapData temp = new MapData();
            temp.set_info(MapDataTemp);
            global_instance.Instance.SetMapData(temp);
            global_instance.Instance._crash_mole_grid_manager.set_max_height(temp.height_);
            global_instance.Instance._crash_mole_grid_manager.set_max_width(temp.width_);
            global_instance.Instance._ngui_edit_manager._main_panel.gameObject.SetActive(false);
            global_instance.Instance._ngui_edit_manager.update_game_type(game_type.game);
			global_instance.Instance._global_game_type = global_game_type.global_game_type_game;
        }
    }
Пример #3
0
 public void EditClick()
 {
     message.CrashMapData MapDataTemp = GetCurrentSelectMapData();
     MapData temp = new MapData();
     temp.set_info(MapDataTemp);
     global_instance.Instance.SetMapData(temp);
     global_instance.Instance._global_game_type = global_game_type.global_game_type_edit;
     global_instance.Instance._ngui_edit_manager.update_game_type(game_type.edit);
     this.gameObject.SetActive(false);
 }