forked from yinhui1129754/CppFishingCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.cpp
More file actions
35 lines (32 loc) · 686 Bytes
/
Copy pathaction.cpp
File metadata and controls
35 lines (32 loc) · 686 Bytes
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
#include "../stdafx.h"
#include "action.h"
action::action(DemoApp * app)
{
this->Container = new DisplayObject();
this->app = app;
}
action::~action()
{
}
void action::addChild(sprite * child) {
this->Container->addChild(child);
}
void action::addTicker(ticker * tk) {
this->tk.push_back(tk);
}
ticker * action::getTickerById(string id) {
unsigned int len = this->tk.size();
for (unsigned int i = 0;i < len; i++) {
if (this->tk[i]->id == id) {
return this->tk[i];
}
}
return NULL;
};
void action::render(DemoApp ** app) {
this->Container->render(this->app);
unsigned int len = this->tk.size();
for (unsigned int i = 0;i < len;i++) {
this->tk[i]->render(app);
}
}