Beispiel #1
0
        public void SetImage(Parameters.InvaderTypes invaderType)
        {
            switch (invaderType)
            {
            case Parameters.InvaderTypes.bug:
                Image        = Properties.Resources.bug1;
                invaderScore = Parameters.bugScore;
                break;

            case Parameters.InvaderTypes.satellite:
                Image        = Properties.Resources.satellite1;
                invaderScore = Parameters.satelliteScore;
                break;

            case Parameters.InvaderTypes.saucer:
                Image        = Properties.Resources.flyingsaucer1;
                invaderScore = Parameters.saucerScore;
                break;

            case Parameters.InvaderTypes.spaceship:
                Image        = Properties.Resources.spaceship1;
                invaderScore = Parameters.spaceshipScore;
                break;

            case Parameters.InvaderTypes.star:
                Image        = Properties.Resources.star2;
                invaderScore = Parameters.starScore;
                break;

            default: break;
            }
        }
Beispiel #2
0
 public Invader(Point location, Parameters.InvaderTypes invaderType) : base(location)
 {
     this.invaderType = invaderType;
     SetImage(invaderType);
     Location = location;
 }