Class quick test swapping reimplemented.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
2023-07-14 19:14:04 +00:00
co-authored by AMay
parent c75a01a1ad
commit 8d117c42e3
8 changed files with 34 additions and 27 deletions
+4
View File
@@ -19,6 +19,10 @@ const float Player::GROUND_SLAM_SPIN_TIME=0.6f;
Player::Player()
:state(State::NORMAL),lastReleasedMovementKey(DOWN),facingDirection(DOWN){}
Player::Player(Player*player)
:pos(player->GetPos()),vel(player->GetVelocity()),iframe_time(player->iframe_time),lastReleasedMovementKey(player->GetLastReleasedMovementKey()),
facingDirection(GetFacingDirection()){}
bool Player::SetX(float x){
vf2d newPos={x,pos.y};
vi2d tilePos=vi2d(newPos/24)*24;