Example #1
0
 public void AddBody(Transform _transform, float _radius)
 {
     Body body = new Body();
     body.shape = new Circle(_radius);
     body.transform = _transform;
     drawBodies.Add(body);
 }
Example #2
0
 //add body at location
 public void AddBody(Transform _transform)
 {
     Body body = new Body();
     body.shape = new Circle();
     body.transform = _transform;
     drawBodies.Add(body);
 }
Example #3
0
        static void Main(string[] args)
        {
            Body body = new Body();
            //Shape shape = new Circle();

            Transform trans = new Transform();
            trans.position = new Vector2(2, 2);

            //body.shape = shape;
            //body.transform = trans;
        }
Example #4
0
        public override void Render(Transform transform)
        {
            Gl.glPushMatrix();

            //set position

            Gl.glTranslatef((float)transform.position.x, (float)transform.position.y, 0.0f);

            Gl.glBegin(Gl.GL_POLYGON);
            {
                Glu.GLUquadric quadric = Glu.gluNewQuadric();
                Glu.gluQuadricDrawStyle(quadric, Glu.GLU_LINE);
                Glu.gluPartialDisk(quadric, 0, this.m_radius, 32, 32, 0, 360);
            }
            Gl.glPopMatrix();
        }
Example #5
0
 public void SetUp()
 {
     transform = new Transform();
 }
Example #6
0
 public void SetTransform()
 {
     Transform newTransform = new Transform();
     transform = newTransform;
     Assert.AreEqual(transform, newTransform);
 }
Example #7
0
 public virtual void Render(Transform transform)
 {
 }
 public void AddBodyToSceneAtLocationAndRadius()
 {
     Transform _transform = new Transform(new Vector2());
     float radius = 40f;
     titleMenuState.AddBody(_transform, radius);
 }
 public void AddBodyToSceneAtLocation()
 {
     Transform _transform = new Transform(new Vector2());
     titleMenuState.AddBody(_transform);
 }