Image library for all the graph. Just test

hanging.cpp

Committer:
MYY
Date:
2019-05-06
Revision:
5:2dfd00ecc02e

File content as of revision 5:2dfd00ecc02e:

#include"Image.h"

void Image::hanging(int x, int y, const int *graph, N5110 &lcd, Image &Image, float time, int new_score, Rotate &Rotate, float angle, float speed, int sizex, int sizey)
{
    x =  x - speed*cos(angle);
    y =  y + speed*sin(angle);
    //Score = Score + new_score;
    lcd.clear();
    lcd.drawSprite(x, y, sizex,sizey, (int*) graph);
    lcd.drawLine(42,0, x, y,1);
    Image.draw_1(lcd);
    char buffer[14];
    char buffer2[14];
    sprintf(buffer,"%i",Score);
    sprintf(buffer2,"%i",Timer_1);
    lcd.printString(buffer,0,0);
    lcd.printString(buffer2,70,0);
    lcd.refresh();
    wait(time);
    Rotate.hookpoint[0]=x;
    Rotate.hookpoint[1]=y;
}