예제 #1
0
 public void VectorTest()
 {
     Velocity target = new Velocity(); // TODO: Initialize to an appropriate value
     Vector2 actual;
     actual = target.Vector;
     Assert.AreEqual<Vector2>(Vector2.Zero, actual);
 }
예제 #2
0
 public void VectorTest1()
 {
     Velocity target = new Velocity(float.MaxValue, -34242); // TODO: Initialize to an appropriate value
     Vector2 actual;
     Vector2 targetVector = new Vector2(target.XVelocity.Value, target.YVelocity.Value);
     actual = target.Vector;
     Assert.AreEqual<Vector2>(targetVector, actual);
 }
예제 #3
0
 public void VelocityConstructorTestSomeNull()
 {
     float YSpeed = 5F;
     Velocity target = new Velocity();
     target.YVelocity = YSpeed;
     Assert.IsNull(target.XVelocity);
     Assert.Equals(target.YVelocity, YSpeed);
 }
예제 #4
0
 public void VelocityConstructorTestNoNull()
 {
     float XSpeed = 2423.53489F;
     float YSpeed = -35.48F;
     Velocity target = new Velocity(XSpeed, YSpeed);
     Assert.Equals(target.XVelocity, XSpeed);
     Assert.Equals(target.YVelocity, YSpeed);
 }
예제 #5
0
 public void VelocityConstructorTestAllNull()
 {
     Velocity target = new Velocity();
     Assert.IsNull(target.XVelocity);
     Assert.IsNull(target.YVelocity);
 }
예제 #6
0
 public SpriteBuilder SetVelocity(Velocity v)
 {
     if (v.XVelocity.HasValue)
     {
         _constructing.XSpeed = v.XVelocity.Value;
     }
     if (v.YVelocity.HasValue)
     {
         _constructing.YSpeed = v.YVelocity.Value;
     }
     return this;
 }