Yuheng Huo / Mbed 2 deprecated hyh_copy_copy

Dependencies:   mbed FXOS8700CQ

Committer:
Neowless
Date:
Fri May 15 17:44:25 2020 +0000
Revision:
2:cc9d8ec2e1f4
Parent:
1:48b0bf0bcda8
Child:
3:31ff7b3e2005
test;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Neowless 1:48b0bf0bcda8 1 #include "engine.h"
Neowless 1:48b0bf0bcda8 2
Neowless 1:48b0bf0bcda8 3
Neowless 1:48b0bf0bcda8 4 void engine::init(){
Neowless 1:48b0bf0bcda8 5 }
Neowless 1:48b0bf0bcda8 6
Neowless 2:cc9d8ec2e1f4 7 events engine::evet_check(chara &p, obs &b, Gamepad &pad){
Neowless 1:48b0bf0bcda8 8 xy pxy = p.getxy();
Neowless 1:48b0bf0bcda8 9 int width = p.getwidth();
Neowless 1:48b0bf0bcda8 10 int height = p.getheight();
Neowless 1:48b0bf0bcda8 11 if(b.x>-1){
Neowless 1:48b0bf0bcda8 12 if(((pxy.x - b.width < b.x)&&(pxy.x+width>b.x)) &&((pxy.y-b.height<b.y)&&(pxy.y+height>b.y))){
Neowless 1:48b0bf0bcda8 13 return DEAD;
Neowless 1:48b0bf0bcda8 14 }
Neowless 1:48b0bf0bcda8 15 }
Neowless 1:48b0bf0bcda8 16 return NONE;
Neowless 1:48b0bf0bcda8 17 }
Neowless 1:48b0bf0bcda8 18
Neowless 1:48b0bf0bcda8 19
Neowless 2:cc9d8ec2e1f4 20 int engine::randomobs(){
Neowless 2:cc9d8ec2e1f4 21 int y = (rand() % (31))+ 5;
Neowless 1:48b0bf0bcda8 22 return y;
Neowless 1:48b0bf0bcda8 23 }
Neowless 1:48b0bf0bcda8 24
Neowless 1:48b0bf0bcda8 25