Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Engine/engine.cpp
- Committer:
- Neowless
- Date:
- 2020-05-15
- Revision:
- 3:31ff7b3e2005
- Parent:
- 2:cc9d8ec2e1f4
File content as of revision 3:31ff7b3e2005:
#include "engine.h"
void engine::init(){
}
events engine::event_check(chara &p, obs &b, Gamepad &pad){
xy pxy = p.getxy();
if(b.x>-1){
if(((pxy.x - b.width < b.x)&&(pxy.x+7>b.x)) &&((pxy.y-b.height<b.y)&&(pxy.y+8>b.y))){
return DEAD;
}
}
return NONE;
}
int engine::randomobs(){
int y = (rand() % (31))+ 5;
return y;
}