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; } }
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); } }
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; } }
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; } }
public Button(bool vis) { Visible = vis; id = BUTTON_MEDIA_ID.UPGRADE; }
public Button(bool vis) { Visible = vis; id = BUTTON_MEDIA_ID.UPGRADE; }