コード例 #1
0
 public Vector2PointerAnimation(MyGame theGame, Vector2Container valueToAnimate, Vector2 targetValue, int playAmount)
     : base(theGame, playAmount)
 {
     m_startValue     = valueToAnimate.Value;
     m_endValue       = targetValue;
     m_valueToAnimate = valueToAnimate;
 }
コード例 #2
0
 public StrokeGenerator()
 {
     m_stroker      = new StrokeMath();
     m_src_vertices = new VertexSequence();
     m_out_vertices = new Vector2Container();
     m_status       = StrokeMath.status_e.initial;
 }
コード例 #3
0
        public void ReleaseReferenceTest()
        {
            Vector2Container v = Pool <Vector2Container> .Get();

            Pool <Vector2Container> .Release(v);

            Assert.DoesNotThrow(delegate {
                Pool <Vector2Container> .Get();
            });
        }
コード例 #4
0
 public ContourGenerator()
 {
     m_stroker      = new StrokeMath();
     m_width        = 1;
     m_src_vertices = new VertexSequence();
     m_out_vertices = new Vector2Container();
     m_status       = StrokeMath.status_e.initial;
     m_src_vertex   = 0;
     m_closed       = false;
     m_orientation  = 0;
     m_auto_detect  = false;
 }
コード例 #5
0
		public ContourGenerator()
		{
			m_stroker = new StrokeMath();
			m_width = 1;
			m_src_vertices = new VertexSequence();
			m_out_vertices = new Vector2Container();
			m_status = StrokeMath.status_e.initial;
			m_src_vertex = 0;
			m_closed = false;
			m_orientation = 0;
			m_auto_detect = false;
		}
コード例 #6
0
 public void SerializeVectorContainer()
 {
     try
     {
         var obj = new Vector2Container();
         obj.Vector2Field = new Vector2(1.25f, 2.5f);
         obj.Vector2Property = new Vector2(2.25f, 3.5f);
         var data = JsonConvert.SerializeObject(obj);
         Assert.AreEqual("{\"Vector2Field\":{\"x\":1.25,\"y\":2.5},\"Vector2Property\":{\"x\":2.25,\"y\":3.5}}", data);
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.ToString());
     }
 }
コード例 #7
0
        public void GetReferenceTest()
        {
            Vector2Container v = Pool <Vector2Container> .Get();

            Assert.NotNull(v);
        }
コード例 #8
0
 public Vector2PointerAnimation(MyGame theGame, Vector2Container valueToAnimate, Vector2 targetValue, int playAmount)
     : base(theGame, playAmount)
 {
     m_startValue = valueToAnimate.Value;
     m_endValue = targetValue;
     m_valueToAnimate = valueToAnimate;
 }