-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActor.cpp
47 lines (34 loc) · 964 Bytes
/
Actor.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
Author: Esmit Perez (@esmitperez)
Fecha: Jul 10 2013
Inspirado en http://playground.arduino.cc/Code/StopWatchClass y http://arduino.cc/en/Hacking/LibraryTutorial
*/
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include "Actor.h"
#include "constants.h"
Actor::Actor(char* n,int initialX, int initialY, int i, Animation &defAnimation) {
name = n;
actorCharNumber = i;
pos_curr_x = initialX;
pos_curr_y = initialY;
defaultAnimation = &defAnimation;
currentAnimation = &defAnimation;
}
void Actor::info() {
#if DEBUG_ON == true
Serial.print("Actor: ");
Serial.print(name);
Serial.print(", actorCharNumber");
Serial.print(actorCharNumber);
Serial.print(", X: ");
Serial.print(pos_curr_x);
Serial.print(", Y: ");
Serial.print(pos_curr_y);
Serial.print(", Current Movie: ");
Serial.println(currentAnimation->name);
#endif
}