feat(game_core): 重构游戏引擎并添加新功能
- 重构了游戏引擎的核心逻辑和架构 - 添加了新的实体组件系统(ECS) - 实现了简单的碰撞检测和响应 - 新增了地图和子弹功能 - 优化了输入处理和渲染逻辑 - 调整了游戏控制方式
This commit is contained in:
19
game_core/entities/entities.h
Normal file
19
game_core/entities/entities.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef __ENTITY_H__
|
||||
#define __ENTITY_H__
|
||||
|
||||
#include "tilemap.h"
|
||||
#include "layer.h"
|
||||
|
||||
enum {
|
||||
PLAYER,
|
||||
ENEMY,
|
||||
BULLET,
|
||||
};
|
||||
|
||||
void init_player(ge_ecs_t* ecs, ge_entity_t **_player);
|
||||
|
||||
#define MAX_BULLET 16
|
||||
#define BASIC_SPEED (1 << GE_PHYSICS_VELOCITY_BIT)
|
||||
void init_bullet(ge_ecs_t* ecs, ge_entity_t **_bullet);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user