Page MenuHomePhabricator (Chris)

Spaceship.cpp
No OneTemporary

Authored By
Unknown
Size
423 B
Referenced Files
None
Subscribers
None

Spaceship.cpp

#include "Spaceship.h"
extern int width;
extern int height;
Spaceship::Spaceship(int x, int y)
{
x_pos = x;
y_pos = y;
boxright = 60;
boxleft = 60;
boxheight = 15;
health = 60;
active = true;
}
Spaceship::Spaceship() {}
void Spaceship::MoveSpaceshipLeft()//left bound
{
if (x_pos >= 50)
x_pos = x_pos - 7;
}
void Spaceship::MoveSpaceshipRight() //right bound
{
if (x_pos<width - 50)
x_pos = x_pos + 7;
}

File Metadata

Mime Type
text/x-c
Expires
Sun, Nov 15, 12:30 AM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
110666
Default Alt Text
Spaceship.cpp (423 B)

Event Timeline