refactor #2
This commit is contained in:
@@ -67,15 +67,4 @@ void Camera::followBy(Mesh &t_mesh)
|
|||||||
position.x = unitCirclePosition.x + t_mesh.position.x;
|
position.x = unitCirclePosition.x + t_mesh.position.x;
|
||||||
position.y = unitCirclePosition.y + t_mesh.position.y;
|
position.y = unitCirclePosition.y + t_mesh.position.y;
|
||||||
position.z = unitCirclePosition.z + t_mesh.position.z;
|
position.z = unitCirclePosition.z + t_mesh.position.z;
|
||||||
|
|
||||||
if (position.x > (-0.04F * verticalLevel) &&
|
|
||||||
position.x < 0.0F &&
|
|
||||||
position.z > (0.998F * verticalLevel))
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
// position.x = 0.0F;
|
|
||||||
// position.y = 0.0F;
|
|
||||||
// position.z = 0.0F;
|
|
||||||
// horizontalLevel = 0.0F;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,11 +37,6 @@ Floor::~Floor() {}
|
|||||||
// Methods
|
// Methods
|
||||||
// ----
|
// ----
|
||||||
|
|
||||||
/** Init floor position and animation timer position
|
|
||||||
* @param spec pointer to 3D object specification
|
|
||||||
* @param spiral Spiral position
|
|
||||||
* @param initOffset Number of floor (index)
|
|
||||||
*/
|
|
||||||
void Floor::init(const Mesh &mother, const Point &spiral, const u8 &initOffset)
|
void Floor::init(const Mesh &mother, const Point &spiral, const u8 &initOffset)
|
||||||
{
|
{
|
||||||
this->mesh.position.set(0.00F, -10.00F, 0.00F);
|
this->mesh.position.set(0.00F, -10.00F, 0.00F);
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ Player::~Player()
|
|||||||
// Methods
|
// Methods
|
||||||
// ----
|
// ----
|
||||||
|
|
||||||
/** Update player position and control gravity */
|
|
||||||
void Player::update(const Pad &t_pad, const Camera &t_camera, const FloorManager &floorManager, Enemy &enemy)
|
void Player::update(const Pad &t_pad, const Camera &t_camera, const FloorManager &floorManager, Enemy &enemy)
|
||||||
{
|
{
|
||||||
Vector3 *nextPos = getNextPosition(t_pad, t_camera);
|
Vector3 *nextPos = getNextPosition(t_pad, t_camera);
|
||||||
@@ -106,7 +105,6 @@ Vector3 *Player::getNextPosition(const Pad &t_pad, const Camera &t_camera)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Move player when pad move buttons are pressed and is not blocked by any floor side */
|
|
||||||
void Player::updatePosition(const Pad &t_pad, const Camera &t_camera, const FloorManager &t_floorManager, const FloorsCheck &t_floorsCheck, const Vector3 &t_nextPos, Enemy &enemy)
|
void Player::updatePosition(const Pad &t_pad, const Camera &t_camera, const FloorManager &t_floorManager, const FloorsCheck &t_floorsCheck, const Vector3 &t_nextPos, Enemy &enemy)
|
||||||
{
|
{
|
||||||
if (t_pad.rJoyH >= 200)
|
if (t_pad.rJoyH >= 200)
|
||||||
@@ -203,10 +201,6 @@ void Player::updateGravity(FloorsCheck *t_floorsCheck)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---
|
|
||||||
// Private
|
|
||||||
// ---
|
|
||||||
|
|
||||||
FloorsCheck *Player::checkFloors(const FloorManager &t_floorManager, const Vector3 &t_nextPos)
|
FloorsCheck *Player::checkFloors(const FloorManager &t_floorManager, const Vector3 &t_nextPos)
|
||||||
{
|
{
|
||||||
FloorsCheck *result = new FloorsCheck;
|
FloorsCheck *result = new FloorsCheck;
|
||||||
|
|||||||
Reference in New Issue
Block a user