AndEngine IEntity之旋转

/**
         * 测试旋转的方法 旋转是绕着实体的中心点进行旋转,旋转角度(角度而不是弧度)大于0 表示顺时针旋转
         */
        Line line1=new Line(200,400,400,400,getVertexBufferObjectManager());
        scene.attachChild(line1);
        Line line2=new Line(200,400,400,400,getVertexBufferObjectManager());
        line2.setRotation(45);
        scene.attachChild(line2);

效果如下:

Screenshot_2015-01-09-12-25-17

posted @ 2015-01-09 12:29  LinuxCC  阅读(174)  评论(0编辑  收藏  举报