Commit 1fead17a authored by Ilya Prokhorov's avatar Ilya Prokhorov

Pre camera remove

parent 4b610692
......@@ -24,12 +24,12 @@ Camera::Camera()
plane = make_shared<FSEGTVector>();
}
void Camera::rotate(float diff)
/*void Camera::rotate(float diff)
{
direction->rotate(diff);
plane->rotate(diff);
}
}*/
void Camera::setPosition(float x, float y)
{
......
......@@ -37,7 +37,7 @@ public:
shared_ptr<FSEGTVector> direction;
shared_ptr<FSEGTVector> plane;
void rotate(float diff);
//void rotate(float diff);
void setPosition(float x, float y);
void setRotation(float angle);
......
......@@ -15,14 +15,14 @@ int FSEGTVector::getTileY()
return tileY;
}
void FSEGTVector::rotate(float diff)
/*void FSEGTVector::rotate(float diff)
{
float oldX = this->x;
this->x = this->x * cos(-diff) - this->y * sin(-diff);
this->y = oldX * sin(-diff) + this->y * cos(-diff);
}
}*/
shared_ptr<FSEGTVector> FSEGTVector::vectorXYZ(float x, float y, float z)
{
......
......@@ -25,7 +25,8 @@ public:
int getTileX();
int getTileY();
void rotate(float diff);
// void rotate(float diff);
shared_ptr<FSEGTVector> copy();
void populate(shared_ptr<FSEGTVector> vector);
......
......@@ -9,6 +9,9 @@
FSEGTInputController::FSEGTInputController()
{
this->jumpKeyPressed = false;
this->crouchKeyPressed = false;
this->ioSystem = nullptr;
this->leftKeyPressed = false;
this->rightKeyPressed = false;
......@@ -54,6 +57,9 @@ void FSEGTInputController::pollKey()
void FSEGTInputController::clearKeys()
{
this->jumpKeyPressed = false;
this->crouchKeyPressed = false;
this->leftKeyPressed = false;
this->rightKeyPressed = false;
this->downKeyPressed = false;
......@@ -67,6 +73,15 @@ void FSEGTInputController::clearKeys()
this->shootKeyPressed = false;
}
bool FSEGTInputController::isJumpKeyPressed() {
return this->jumpKeyPressed;
}
bool FSEGTInputController::isCrouchKeyPressed() {
return this->crouchKeyPressed;
}
bool FSEGTInputController::isExitKeyPressed()
{
return this->exitKeyPressed;
......
......@@ -23,6 +23,9 @@ class FSEGTInputController: public Object
public:
FSEGTInputController();
virtual bool isJumpKeyPressed();
virtual bool isCrouchKeyPressed();
virtual bool isLeftKeyPressed();
virtual bool isRightKeyPressed();
virtual bool isUpKeyPressed();
......@@ -47,7 +50,9 @@ public:
virtual ~FSEGTInputController();
public:
bool jumpKeyPressed = false;
bool crouchKeyPressed = false;
bool leftKeyPressed = false;
bool rightKeyPressed = false;
bool downKeyPressed = false;
......
......@@ -53,7 +53,7 @@ bool FSEGTUtils::contains3D(shared_ptr<Object> object)
auto contains3D = object->containsComponentWithIdentifier(make_shared<string>(FSEGTConstComponentsModel)) ||
object->containsComponentWithIdentifier(make_shared<string>(FSEGTConstComponentsSerializedModel));
cout << "contains3D: " << contains3D << endl;
//cout << "contains3D: " << contains3D << endl;
return contains3D;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment