Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 private void Start()
 {
     PopulateGrid();
     game         = FindObjectOfType <Level>().gameState;
     bonusControl = FindObjectOfType <BonusControl>();
 }