탑다운 미니맵 구현
This commit is contained in:
@@ -42,6 +42,7 @@ class MainScene : public ax::Scene
|
||||
public:
|
||||
bool init() override;
|
||||
void update(float delta) override;
|
||||
void render(ax::Renderer* renderer, const ax::Mat4& eyeTransform, const ax::Mat4* eyeProjection = nullptr) override;
|
||||
|
||||
// touch
|
||||
void onTouchesBegan(const std::vector<ax::Touch*>& touches, ax::Event* event);
|
||||
@@ -73,8 +74,14 @@ private:
|
||||
ax::EventListenerMouse* _mouseListener = nullptr;
|
||||
int _sceneID = 0;
|
||||
|
||||
// Game Objects
|
||||
ax::MeshRenderer* _playerCube = nullptr;
|
||||
ax::DrawNode* _miniMapBorder = nullptr;
|
||||
std::map<ax::EventKeyboard::KeyCode, bool> _keyStates;
|
||||
|
||||
// Camera Orbit State
|
||||
ax::Camera* _camera3D = nullptr;
|
||||
ax::Camera* _miniMapCamera = nullptr;
|
||||
ax::Vec3 _targetPos = ax::Vec3::ZERO;
|
||||
float _pitch = 45.0f; // degrees
|
||||
float _yaw = 45.0f; // degrees
|
||||
|
||||
Reference in New Issue
Block a user