Ejemplo n.º 1
0
 /// <summary>
 /// Constructor for shot enemy class <seealso cref="ShotEnemyImpl"/>. </summary>
 /// <param name="enemyX"> Integer: Coordinate X of the enemy that called this class. </param>
 /// <param name="enemyY"> Integer: Coordinate Y of the enemy that called this class. </param>
 /// <param name="dir"> DirEnemy: Direction of the enemy that called this class. </param>
 public ShotEnemyImpl(int enemyX, int enemyY, DirEnemy dir) : base(new Pair <int, int>(enemyX, enemyY), 0, 0, MYID)
 {
     this.dir = dir;
     this.spd = new Pair <int, int>(0, 0);
     whichSpeed();
     setSpeed(spd.GetX(), spd.GetY());
     Hitbox = new Rectangle(this.Position.GetX() - (HIT / 2), this.Position.GetY() - (HIT / 2), HIT, HIT);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Method of <seealso cref="ShotEnemy"/>
 /// </summary>
 /// <param name="dir"> <seealso cref="DirEnemy"/> </param>
 public virtual DirEnemy SetDir(DirEnemy value)
 {
     return(this.dir = value);
 }