dimanche 27 janvier 2019

Controling image name

I want to do something like if image name (which are currently in picture box) = enemy1 do this and if image name = enemy2 do something else

       case 1:
              Image enemy1 = zaverpol.Properties.Resources._1tier_enemy;
                    this.pictureBox_enemy.Image = enemy1;
                    enemyhealth = 10; enemyattack = 5;
                    ActualizationEnemyStats();
                    break;
       case 2:
              Image enemy2 = zaverpol.Properties.Resources._2tier_enemy;
                    this.pictureBox_enemy.Image = enemy2;

Aucun commentaire:

Enregistrer un commentaire