Ejemplo n.º 1
0
 public static Texture2D GetButtonTexture(BUTTON_MEDIA_ID mediaId)
 {
     if (null == Content)
     {
         throw new ContentNotDefinedException();
     }
     if (btnTextures.ContainsKey(mediaId))
     {
         return btnTextures[mediaId];
     }
     else
     {
         Texture2D newTexture = Content.Load<Texture2D>(buttonNames[(int)mediaId]);
         btnTextures.Add(mediaId, newTexture);
         return newTexture;
     }
 }
Ejemplo n.º 2
0
 public static Texture2D GetButtonTexture(BUTTON_MEDIA_ID mediaId)
 {
     if (null == Content)
     {
         throw new ContentNotDefinedException();
     }
     if (btnTextures.ContainsKey(mediaId))
     {
         return(btnTextures[mediaId]);
     }
     else
     {
         Texture2D newTexture = Content.Load <Texture2D>(buttonNames[(int)mediaId]);
         btnTextures.Add(mediaId, newTexture);
         return(newTexture);
     }
 }
Ejemplo n.º 3
0
 public Button(bool vis, TowerTypes towerType)
 {
     Visible = vis;
     switch (towerType)
     {
         case TowerTypes.Teacher:
             id = BUTTON_MEDIA_ID.TEACHER;
             break;
         case TowerTypes.Lawyer:
             id = BUTTON_MEDIA_ID.LAWYER;
             break;
         case TowerTypes.Judge:
             id = BUTTON_MEDIA_ID.JUDGE;
             break;
         default:
             id = BUTTON_MEDIA_ID.TEACHER;
             break;
     }
 }
Ejemplo n.º 4
0
        public Button(bool vis, TowerTypes towerType)
        {
            Visible = vis;
            switch (towerType)
            {
            case TowerTypes.Teacher:
                id = BUTTON_MEDIA_ID.TEACHER;
                break;

            case TowerTypes.Lawyer:
                id = BUTTON_MEDIA_ID.LAWYER;
                break;

            case TowerTypes.Judge:
                id = BUTTON_MEDIA_ID.JUDGE;
                break;

            default:
                id = BUTTON_MEDIA_ID.TEACHER;
                break;
            }
        }
Ejemplo n.º 5
0
 public Button(bool vis)
 {
     Visible = vis;
     id = BUTTON_MEDIA_ID.UPGRADE;
 }
Ejemplo n.º 6
0
 public Button(bool vis)
 {
     Visible = vis;
     id      = BUTTON_MEDIA_ID.UPGRADE;
 }