copy

Dependencies:   Gamepad N5110 mbed

Committer:
hongyunAHN
Date:
Wed May 03 22:37:17 2017 +0000
Revision:
0:ffd6b3f45a8c
copy

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hongyunAHN 0:ffd6b3f45a8c 1 #include "Background.h"
hongyunAHN 0:ffd6b3f45a8c 2
hongyunAHN 0:ffd6b3f45a8c 3 Background::Background()
hongyunAHN 0:ffd6b3f45a8c 4 {
hongyunAHN 0:ffd6b3f45a8c 5
hongyunAHN 0:ffd6b3f45a8c 6 }
hongyunAHN 0:ffd6b3f45a8c 7
hongyunAHN 0:ffd6b3f45a8c 8 Background::~Background()
hongyunAHN 0:ffd6b3f45a8c 9 {
hongyunAHN 0:ffd6b3f45a8c 10
hongyunAHN 0:ffd6b3f45a8c 11 }
hongyunAHN 0:ffd6b3f45a8c 12
hongyunAHN 0:ffd6b3f45a8c 13 void Background::init()
hongyunAHN 0:ffd6b3f45a8c 14 {
hongyunAHN 0:ffd6b3f45a8c 15
hongyunAHN 0:ffd6b3f45a8c 16
hongyunAHN 0:ffd6b3f45a8c 17 }
hongyunAHN 0:ffd6b3f45a8c 18
hongyunAHN 0:ffd6b3f45a8c 19 void Background::read_input(Gamepad &pad)
hongyunAHN 0:ffd6b3f45a8c 20 {
hongyunAHN 0:ffd6b3f45a8c 21 _d = pad.get_direction();
hongyunAHN 0:ffd6b3f45a8c 22 _mag = pad.get_mag();
hongyunAHN 0:ffd6b3f45a8c 23 }
hongyunAHN 0:ffd6b3f45a8c 24
hongyunAHN 0:ffd6b3f45a8c 25 void Background::draw(N5110 &lcd)
hongyunAHN 0:ffd6b3f45a8c 26 {
hongyunAHN 0:ffd6b3f45a8c 27 const char array[48][85]={
hongyunAHN 0:ffd6b3f45a8c 28 {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
hongyunAHN 0:ffd6b3f45a8c 76
hongyunAHN 0:ffd6b3f45a8c 77 };
hongyunAHN 0:ffd6b3f45a8c 78
hongyunAHN 0:ffd6b3f45a8c 79 }
hongyunAHN 0:ffd6b3f45a8c 80
hongyunAHN 0:ffd6b3f45a8c 81 void Background::update(Gamepad &pad,N5110 &lcd)
hongyunAHN 0:ffd6b3f45a8c 82 {
hongyunAHN 0:ffd6b3f45a8c 83 check_goal(pad,lcd);
hongyunAHN 0:ffd6b3f45a8c 84
hongyunAHN 0:ffd6b3f45a8c 85
hongyunAHN 0:ffd6b3f45a8c 86
hongyunAHN 0:ffd6b3f45a8c 87
hongyunAHN 0:ffd6b3f45a8c 88
hongyunAHN 0:ffd6b3f45a8c 89 }
hongyunAHN 0:ffd6b3f45a8c 90
hongyunAHN 0:ffd6b3f45a8c 91
hongyunAHN 0:ffd6b3f45a8c 92
hongyunAHN 0:ffd6b3f45a8c 93
hongyunAHN 0:ffd6b3f45a8c 94
hongyunAHN 0:ffd6b3f45a8c 95 void Background::check_goal(Gamepad &pad ,N5110 &lcd)
hongyunAHN 0:ffd6b3f45a8c 96 {
hongyunAHN 0:ffd6b3f45a8c 97 Vector2D Player_pos = _player.get_pos();
hongyunAHN 0:ffd6b3f45a8c 98
hongyunAHN 0:ffd6b3f45a8c 99 if((Player_pos.x,Player_pos.y)==(40,24)){
hongyunAHN 0:ffd6b3f45a8c 100 lcd.printString(" GOAL ",0,2);
hongyunAHN 0:ffd6b3f45a8c 101
hongyunAHN 0:ffd6b3f45a8c 102 pad.leds_on();
hongyunAHN 0:ffd6b3f45a8c 103 wait(0.5);
hongyunAHN 0:ffd6b3f45a8c 104 pad.leds_off();
hongyunAHN 0:ffd6b3f45a8c 105 }
hongyunAHN 0:ffd6b3f45a8c 106
hongyunAHN 0:ffd6b3f45a8c 107 if((Player_pos.x,Player_pos.y)==(83,43) ){
hongyunAHN 0:ffd6b3f45a8c 108 lcd.printString(" FAKE ",0,2);
hongyunAHN 0:ffd6b3f45a8c 109 lcd.printString(" Find the other way ",0,2);
hongyunAHN 0:ffd6b3f45a8c 110 lcd.refresh();
hongyunAHN 0:ffd6b3f45a8c 111 }
hongyunAHN 0:ffd6b3f45a8c 112 if((Player_pos.x,Player_pos.y)==(56,4)){
hongyunAHN 0:ffd6b3f45a8c 113 pad.leds_on();
hongyunAHN 0:ffd6b3f45a8c 114 lcd.printString(" trap ",0,2);
hongyunAHN 0:ffd6b3f45a8c 115 pad.leds_off();
hongyunAHN 0:ffd6b3f45a8c 116 lcd.printString(" Find the other way ",0,2);
hongyunAHN 0:ffd6b3f45a8c 117 lcd.refresh();
hongyunAHN 0:ffd6b3f45a8c 118 Player_pos.x==2;
hongyunAHN 0:ffd6b3f45a8c 119 Player_pos.y==2;
hongyunAHN 0:ffd6b3f45a8c 120
hongyunAHN 0:ffd6b3f45a8c 121 }
hongyunAHN 0:ffd6b3f45a8c 122 if((Player_pos.x,Player_pos.y)==(77,29)){
hongyunAHN 0:ffd6b3f45a8c 123 pad.leds_on();
hongyunAHN 0:ffd6b3f45a8c 124 lcd.printString(" trap ",0,2);
hongyunAHN 0:ffd6b3f45a8c 125 lcd.refresh();
hongyunAHN 0:ffd6b3f45a8c 126 pad.leds_off();
hongyunAHN 0:ffd6b3f45a8c 127 Player_pos.x==2;
hongyunAHN 0:ffd6b3f45a8c 128 Player_pos.y==2;
hongyunAHN 0:ffd6b3f45a8c 129
hongyunAHN 0:ffd6b3f45a8c 130 }
hongyunAHN 0:ffd6b3f45a8c 131 if((Player_pos.x,Player_pos.y)==(65,40)){
hongyunAHN 0:ffd6b3f45a8c 132 pad.leds_on();
hongyunAHN 0:ffd6b3f45a8c 133 lcd.printString(" JUMP ",0,2);
hongyunAHN 0:ffd6b3f45a8c 134 pad.leds_off();
hongyunAHN 0:ffd6b3f45a8c 135 lcd.refresh();
hongyunAHN 0:ffd6b3f45a8c 136 Player_pos.x==65;
hongyunAHN 0:ffd6b3f45a8c 137 Player_pos.y==30;
hongyunAHN 0:ffd6b3f45a8c 138
hongyunAHN 0:ffd6b3f45a8c 139 }
hongyunAHN 0:ffd6b3f45a8c 140
hongyunAHN 0:ffd6b3f45a8c 141
hongyunAHN 0:ffd6b3f45a8c 142 }
hongyunAHN 0:ffd6b3f45a8c 143