201377806 ZiWei Liu

Dependencies:   mbed

DodgeEngine/DodgeEngine.cpp

Committer:
alexliu0812
Date:
2020-05-15
Revision:
3:e53e289cd4ba
Parent:
2:d621a4cbe0c2
Child:
4:aada5ebb075d

File content as of revision 3:e53e289cd4ba:

#include "DodgeEngine.h"


DodgeEngine::DodgeEngine(){}
DodgeEngine::~DodgeEngine(){}

void DodgeEngine::init(int x1up, int y1up, int x1down, int y1down, int x2up, int y2up, int x2down, int y2down){
    
    block.blockinit(x1up, y1up, x1down, y1down, x2up, y2up,x2down,y2down);
}

void DodgeEngine::charactermove(N5110 &lcd,Gamepad &pad){
    
    character.move_up(pad);
    character.move_down();
    character.boundry();
    character.draw(lcd);
    
}

void DodgeEngine::blockmove(N5110 &lcd){
    
    block.draw_block(lcd);
       
}

void DodgeEngine::dodgeupdate(){
    block.blockupgrate();
}