public override void Update(GameTime gameTime) { if (mothership.Alive && player.Alive) { mothership.Move(); } base.Update(gameTime); }
public void Move_Left() { //arrange int mothershipW = 10; int screenW = 20; int speed = 5; //should end up at 0 Mothership ms = new Mothership(screenW, mothershipW, mothershipHeight, speed, mothershipPoints, timerIntervalMothership, mothershipSpacerFromTop); //act ms.Move(); int x = ms.BoundingBox.X; //assert Assert.AreEqual(5, x); //expected, actual }