Beispiel #1
0
    public bool InitWithMapIdx(int mapIdx)
    {
        m_mapIdx = mapIdx;
        var mapPaths = WorldControl.GetInstance().MapList.GetMapPaths(mapIdx);

        if (mapPaths == null)
        {
            m_textMapName.text = $"MISSING {mapIdx}";
            SetIconSprite(MapsHelper.GetDefaultIcon());
            return(false);
        }

        m_textMapName.text = mapPaths.Name;
        SetIconSprite(mapPaths.GetMapIcon());
        return(true);
    }
Beispiel #2
0
    private void Awake()
    {
        if (m_checkpoints != null && m_checkpoints.Any())
        {
            for (int i = 0; i < m_checkpoints.Count; ++i)
            {
                m_checkpoints[i].SetIdx(i);
            }
        }

        if (m_miniImage = null)
        {
            m_miniImage = MapsHelper.GetDefaultMiniMap();
        }

        if (m_mapIcon = null)
        {
            m_mapIcon = MapsHelper.GetDefaultIcon();
        }
    }