예제 #1
0
        private void tsmiPersonagesAdd_Click(object sender, EventArgs e)
        {
            int sz = party1.Length;
            System.Array.Resize<Personage>( ref party1, party1.Length + 1);
            party1[sz] = new Personage(Class.Mage, 1);

            PersonagePanel panel = new PersonagePanel( ref party1[sz] );
            this.tlpCharacters.Controls.Add(panel, sz-1, 0);
        }
예제 #2
0
        private void btnLevelUp_Click(object sender, EventArgs e)
        {
            party1[0].LevelUp();
            PersonagePanel panel = (PersonagePanel)this.tlpCharacters.GetControlFromPosition(0, 0);
            this.tlpCharacters.Controls.Remove(panel);

            panel = new PersonagePanel(ref party1[0]);
            this.tlpCharacters.Controls.Add(panel, 0, 0);
        }