private void CreateBonusTile(Form form, int i, int j) { BonusControl chanceControl = new BonusControl(); chanceControl.lblName.Text = _board[i, j].Name; chanceControl.oPicture.Image = File.GetImageFromName((_board[i, j].Name + ".png").Replace(' ', '_')); int[] position = GetTileLocation(i, j);; chanceControl.Location = new Point(position[0], position[1]); chanceControl.Chest = true; form.Controls.Add(chanceControl); }
private void Start() { PopulateGrid(); game = FindObjectOfType <Level>().gameState; bonusControl = FindObjectOfType <BonusControl>(); }