Doxygen comments added

Dependencies:   mbed Gamepad N5110

Bird/Bird.cpp

Committer:
rafeh
Date:
2019-05-06
Revision:
6:bc580b480ac8
Parent:
3:5409b50b01b0
Child:
10:75de0f4da176

File content as of revision 6:bc580b480ac8:

#include "Bird.h"

//Bird::Bird() 
//{

//}



//Bird::~Bird()
//{
    
//}


    
    void Bird::init(int xpos,int ypos) {
        
        _xpos=xpos;
        _ypos=ypos;
    
    }
    
    
    
    void Bird::draw(N5110 &lcd) {
        
        const int shape [6][6] = 
{
    0,0,1,1,0,0,
    0,1,0,1,1,0,
    1,0,1,1,1,1,
    1,1,1,1,1,0,
    0,1,1,1,1,0,
    0,0,0,0,0,0,
    
    };
    
        lcd.drawSprite(_xpos,_ypos,6,6,(int*)shape);
        }
        
        int Bird::get_position(int y, Gamepad &pad) {
            
        if (pad.check_event(Gamepad::A_PRESSED) == true) {
       _y = y-14; 
       }
      else {
          _y=y+2;
          }
      return _y;
       }