示例#1
0
        public void GetDistanceFromCenterTest()
        {
            ArenaDimensions arena = new ArenaDimensions(new PongRoyale_shared.Vector2(10, 10), new PongRoyale_shared.Vector2(0, 0), new PongRoyale_shared.Vector2(0, 0), 10);

            PongRoyale_shared.Vector2 v = new PongRoyale_shared.Vector2(0, 10);
            Assert.IsTrue(arena.GetDistanceFromCenter(v) == 10);
        }
示例#2
0
        public void ArenaDimensionsTest()
        {
            ArenaDimensions arena = new ArenaDimensions(new PongRoyale_shared.Vector2(10, 10), new PongRoyale_shared.Vector2(0, 0), new PongRoyale_shared.Vector2(0, 0), 10);

            Assert.IsTrue(arena.Size.Equals(new PongRoyale_shared.Vector2(10, 10)) && arena.Center.Equals(new PongRoyale_shared.Vector2(0, 0)) && arena.RenderOrigin.Equals(new PongRoyale_shared.Vector2(0, 0)) && arena.Radius == 10);
        }
示例#3
0
 public void UpdateDimensions(Vector2 size, Vector2 center, Vector2 renderOrigin, float radius)
 {
     ArenaDimensions = new ArenaDimensions(size, center, renderOrigin, radius);
 }