Exemple #1
0
 private void LButtonContainer_OnDeselectMap(MapButtonContainer currentSelectedMap)
 {
     currentSelectedMap.MapButton.Unfocus();
     if (this.currentSelectedMap == currentSelectedMap)
     {
         this.currentSelectedMap = null;
     }
 }
Exemple #2
0
        private void LButtonContainer_OnSelectMap(MapButtonContainer currentSelectedMap)
        {
            this.currentSelectedMap?.MapButton.Unfocus();

            this.currentSelectedMap = currentSelectedMap;

            this.currentSelectedMap.MapButton.Focus();
        }
Exemple #3
0
        private void Start()
        {
            int mapCount = MapLoader.Maplist.Count;

            for (int i = 0; i < mapCount; i++)
            {
                MapButtonContainer lButtonContainer = Instantiate(mapButtonContainerTemplate, transform);

                lButtonContainer.MapButton.mapId             = i;
                lButtonContainer.OnSelectedMapAndDifficulty += LButtonContainer_OnSelectedMapAndDifficulty;
                lButtonContainer.OnSelectMap   += LButtonContainer_OnSelectMap;
                lButtonContainer.OnDeselectMap += LButtonContainer_OnDeselectMap;

                mapContainers.Add(lButtonContainer);
            }
        }
Exemple #4
0
 public void DeselectCurrentMap()
 {
     currentSelectedMap?.MapButton.Unfocus();
     currentSelectedMap = null;
 }
Exemple #5
0
 private void OnDestroy()
 {
     OnSelectedMapAndDifficulty = null;
     currentSelectedMap         = null;
 }