mình mới tự học lập trình game trên android thông qua các tutorials về andengine framework
hiện tại mình có một câu hỏi:
làm sao quay 1 ảnh quanh chính nó sử dụng andengine gles2
mình sử dụng body với animatedsprite trong box2d.
đây là ảnh minh họa:
đây là code của mình:
trong oncreateresources():
Mã:
this.mboxfacetextureregion = bitmaptextureatlastextureregionfactory
.createtiledfromasset(this.mbitmaptextureatlas, this,
"box.png", 0, 64, 1, 1); // 64x64
hàm thêm vào quả bóng:
Mã:
private void addbox(final float px, final float py) {
final animatedsprite face;
final body body;
// lay ra anh
face = new animatedsprite(px, py, this.mboxfacetextureregion,
this.getvertexbufferobjectmanager());
// tao vien bao quanh anh - o day la vien tron
body = physicsfactory.createcirclebody(this.mphysicsworld, face,
bodytype.staticbody, fixture_def);
body.setuserdata("monster");
face.setuserdata(body);
// them hinh anh vao man hinh
this.mscene.attachchild(face);
this.mphysicsworld.registerphysicsconnector(new physicsconnector(face,
body, true, true));
}
Xe tải Veam VT260-1 tải trọng 1,9 tấn là mẫu xe mang kiểu dáng hoàn toàn khác biệt so với dòng xe phiên bản trước ấy của Veam là VT260-1. Dù đã ra mắt 2018 nhưng tới bây giờ VT260-1 vẫn được nhiều...
Đánh giá Xe Veam VT260 1.9 tấn