- 메이플 큐브 삭제를 뭐 우리가 원해서 해준거임? [156]
- 로아 리샤편지 15분뒤에 나올꺼다(수정) [1200]
- 로아 (마감,추첨완료)오늘 저녁 8시까지 리샤의 편지 안뜨면 [725]
- 걸그룹 엔믹스 해원 워크돌 승무원 알바 [3]
- 명조 [명조 x 맘스터치 콜라보 번외 이벤트] 암구호를 외쳐 주세요! [2]
- 명조 ? [4]
void HelloWorld::setBox2dWorld()
{
_parent = this->addNewSprite(Vec2(240, 160), Size(0, 0),
b2_kinematicBody, nullptr, 0);
b2Body* body0 = this->addNewSprite(Vec2(240, 180), Size(32, 32),
b2_dynamicBody, "SpinningPeas.png", 1);
b2Body* body1 = this->addNewSprite(Vec2(240, 160 - 100), Size(200, 10),
b2_dynamicBody, nullptr, 2);
b2Body* body2 = this->addNewSprite(Vec2(240, 160 + 100), Size(200, 10),
b2_dynamicBody, nullptr, 2);
b2Body* body3 = this->addNewSprite(Vec2(240 - 100, 160), Size(10, 200),
b2_dynamicBody, nullptr, 2);
b2Body* body4 = this->addNewSprite(Vec2(240 + 100, 160), Size(10, 200),
b2_dynamicBody, nullptr, 2);
b2Body* body5 = this->addNewSprite(Vec2(240, 110), Size(10, 100),
b2_dynamicBody, nullptr, 2);
b2WeldJointDef weldJointDef1;
weldJointDef1.Initialize(body1, _parent, body1->GetPosition());
b2WeldJoint* weldJoint1 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef1);
b2WeldJointDef weldJointDef2;
weldJointDef2.Initialize(body2, _parent, body2->GetPosition());
b2WeldJoint* weldJoint2 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef2);
b2WeldJointDef weldJointDef3;
weldJointDef3.Initialize(body3, _parent, body3->GetPosition());
b2WeldJoint* weldJoint3 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef3);
b2WeldJointDef weldJointDef4;
weldJointDef4.Initialize(body4, _parent, body4->GetPosition());
b2WeldJoint* weldJoint4 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef4);
b2WeldJointDef weldJointDef5;
weldJointDef5.Initialize(body5, _parent, body5->GetPosition());
b2WeldJoint* weldJoint5 = (b2WeldJoint *)_world->CreateJoint(&weldJointDef5);
_parent->SetAngularVelocity(0.5f);
}
내폰젤무거워