refactor: 将数学工具函数移至GameMath类 feat(音频): 实现地图音频控制器 feat(调试): 添加游戏调试UI组件 feat(地图): 增加移动区域边界获取方法 fix(角色): 修复角色移动区域抑制逻辑 refactor(世界): 重构游戏世界场景初始化 docs(音频): 完善音频数据库注释
20 lines
636 B
C++
20 lines
636 B
C++
#pragma once
|
|
|
|
#include <frostbite2D/types/type_math.h>
|
|
#include <vector>
|
|
|
|
namespace frostbite2D::gameMath {
|
|
|
|
int32 RoundWorldCoordinate(float value);
|
|
Vec2 MakeIntegerWorldPoint(int x, int y);
|
|
Vec3 MakeIntegerWorldPosition(int x, int y, int z);
|
|
|
|
bool IsPointOnSegment(const Vec2& point, const Vec2& start, const Vec2& end);
|
|
bool IsPointInPolygon(const std::vector<Vec2>& polygon, const Vec2& point);
|
|
bool IsPointMovable(const std::vector<Vec2>& polygon, int x, int y);
|
|
|
|
std::vector<Vec2> BuildRectPolygon(const Rect& rect);
|
|
std::vector<Rect> BuildPolygonFillRects(const std::vector<Vec2>& polygon);
|
|
|
|
} // namespace frostbite2D::gameMath
|