public HexControl(IResourceObject<Texture2D> Texture, Cell[] cells) { Cells = cells; foreach (Cell c in cells) { c.Color = Color.White * 0.8f; } Scale = 1; this.Texture = Texture; Origin = new Vector2(Texture.Instance.Width / 2, Texture.Instance.Height / 2); }
void hexControl_OnClick(Cell obj) { if (obj.Color != Color.Yellow * 0.5f) { return; } Episode episode = obj.Tag as Episode; EpisodeProgressCounter = 0; foreach (Episode ep in selectedCampaing.Episodes) { if (ep != episode) EpisodeProgressCounter += ep.Missions.Count; else break; } selectedEpisode = episode; textManager.Text = episode.Name + "\n\n\n\n\n" + episode.Description; textManager.Parse(); }