Nemesis game, stats

Stats.cpp

Committer:
musallambseiso
Date:
2017-04-09
Revision:
8:b8e8e2f335e1
Parent:
7:cae9a95427f7
Child:
9:b9ad5e45aebf

File content as of revision 8:b8e8e2f335e1:

#include "Stats.h"

Stats::Stats()
{

}

Stats::~Stats()
{

}

void Stats::draw_health(N5110 &lcd)
{
    lcd.drawLine(76,40,77,40,1);
    lcd.drawLine(79,40,80,40,1);
    lcd.drawLine(75,41,75,43,1);
    lcd.drawLine(81,41,81,43,1);
    lcd.setPixel(78,41);
    lcd.setPixel(76,44);
    lcd.setPixel(80,44);
    lcd.setPixel(77,45);
    lcd.setPixel(79,45);
    lcd.setPixel(78,46);
}

void Stats::check_health(N5110 &lcd, int collisions)
{
    if (collisions == 0) 
    {
        lcd.drawLine(76,41,80,41,1);
        lcd.drawLine(76,42,80,42,1);
        lcd.drawLine(76,43,80,43,1);
        lcd.drawLine(77,44,79,44,1);
        lcd.setPixel(78,45);
    }
    else if (collisions == 1) 
    {
        lcd.drawLine(76,42,80,42,1);
        lcd.drawLine(76,43,80,43,1);
        lcd.drawLine(77,44,79,44,1);
        lcd.setPixel(78,45);
    }
    else if (collisions == 2) 
    {
        lcd.drawLine(76,43,80,43,1);
        lcd.drawLine(77,44,79,44,1);
        lcd.setPixel(78,45);
    }
    else if (collisions == 3) 
    {
        lcd.drawLine(77,44,79,44,1);
        lcd.setPixel(78,45);
    }
    else if (collisions == 4)
    {
        lcd.setPixel(78,45);
    }     
    else if (collisions >= 5)
    {
    }
}