public void DelPanel(BossPanel p) { if (mActivePanels.ContainsKey(p.lblName.Text) == false) { return; } mActivePanels.Remove(p.lblName.Text); }
public void AddPanel(BossPanel p) { if (mActivePanels.ContainsKey(p.lblName.Text) == true) { return; } mActivePanels.Add(p.lblName.Text, p); }
public override void Initialize() { base.Initialize(); Boss = new BossPanel(this); Boss.Coordinate = new Vector2(12 * 64, 3 * 64); Boss.Size = new Size(10 * 64, 11 * 64); Boss.Image = ImageManage.GetSImage("boss"); Boss.CreateHitSpace(3); }
IEnumerator Delay() { yield return(new WaitForSeconds(2)); BossPanel.SetActive(true); yield return(new WaitForSeconds(2)); gameObject.GetComponent <BossFightHandler>().enabled = true; }
private void UpdateInfoText() { string infoText = "Shaiya Boss Timer"; for (int i = 0; i < panelBossList.Controls.Count; i++) { BossPanel p = panelBossList.Controls[i] as BossPanel; if (p.TimerActive == false) { continue; } infoText += "\n" + p.lblName.Text + ": " + p.lblTime.Text; } if (infoText.Length > 63) { infoText = infoText.Substring(0, 60) + "..."; } trayIco.Text = infoText; }
private void LoadList(string Filename) { Properties.Settings.Default.LastList = Filename; panelBossList.Controls.Clear(); try { XmlSerializer xml = new XmlSerializer(typeof(SBossList)); using (FileStream fs = File.OpenRead(Filename)) mBossList = xml.Deserialize(fs) as SBossList; } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e); } int perRow = int.Parse(Properties.Settings.Default.TimerPerRow); int pad = 10; int column = 0, row = 0, maxRow = 0; int panelWidth = 0; for (int i = 0; i < mBossList.Count; i++) { if ((i - (column * perRow)) == perRow) { column++; row = 0; } BossPanel p = new BossPanel(mBossList[i], int.Parse(Properties.Settings.Default.TimerWidth)); p.Location = new Point(10 + (column * (p.Width + 10)), (p.Height * row) + (pad * row)); panelWidth = p.Width; panelBossList.Controls.Add(p); maxRow = Math.Max(maxRow, ++row); } // set Window Height column++; Size = new Size(15 + (column * (panelWidth + 10)), 90 + (maxRow * (30 + pad))); }