1
0
Fork 0

Ajout de la fonction render au monde

Joueur déplaçable
début du cast de rayon
Trop fatigué pour faire de la trigo
This commit is contained in:
trotFunky 2019-06-01 06:42:29 +02:00
parent 76306196c0
commit 59939d182b
5 changed files with 117 additions and 4 deletions

View file

@ -8,3 +8,21 @@
Player::Player(float x, float y, float alpha) : x(x), y(y), orientation(alpha)
{}
void Player::move(float dx, float dy)
{
x += dx;
y += dy;
}
void Player::rotate(int alpha)
{
orientation += alpha%360;
if(orientation >= 360)
{
orientation -= 360;
}
if(orientation <= 360)
{
orientation += 360;
}
}