feat(game_core): 重构游戏引擎并添加新功能

- 重构了游戏引擎的核心逻辑和架构
- 添加了新的实体组件系统(ECS)
- 实现了简单的碰撞检测和响应
- 新增了地图和子弹功能
- 优化了输入处理和渲染逻辑
- 调整了游戏控制方式
This commit is contained in:
ZZY
2025-07-02 12:14:57 +08:00
parent 89bede93a9
commit b5b2c90e75
32 changed files with 856 additions and 441 deletions

View File

@@ -25,11 +25,11 @@ ge_physics_system_run_all(ge_physics_system_t* ctx) {
Assert(comp != NULL);
ge_physics_component_type_t type= comp->type;
if (type & GE_PHYSICS_COMPONENT_TYPE_ACCELERATION) {
if (type & GE_PHYSICS_COMP_TYPE_ACCELERATION) {
comp->velocity.x += comp->acceleration.x >> GE_PHYSICS_ACCELERATION_BIT;
comp->velocity.y += comp->acceleration.y >> GE_PHYSICS_ACCELERATION_BIT;
}
if (type & GE_PHYSICS_COMPONENT_TYPE_VELOCITY) {
if (type & GE_PHYSICS_COMP_TYPE_VELOCITY) {
entity->position.x += comp->velocity.x >> GE_PHYSICS_VELOCITY_BIT;
entity->position.y += comp->velocity.y >> GE_PHYSICS_VELOCITY_BIT;
}