-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpgrade.cpp
More file actions
37 lines (32 loc) · 752 Bytes
/
Upgrade.cpp
File metadata and controls
37 lines (32 loc) · 752 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
36
37
/*
* File: Upgrade.cpp
* Author: iMer
*
* Created on 24. August 2014, 21:16
*/
#include "Upgrade.hpp"
#include "ExtraNodeTypes.hpp"
using namespace engine;
Upgrade::Upgrade(Scene* scene) : SpriteNode(scene) {
}
Upgrade::~Upgrade() {
}
uint8_t Upgrade::GetType() const{
return NT_UPGRADE;
}
bool Upgrade::initialize(Json::Value& root){
if (!SpriteNode::initialize(root)){
return false;
}
std::string upgradetype = root.get("upgradeType", "bubble").asString();
if (upgradetype == "bubble"){
m_upgradeType = UPGRADE_BUBBLE;
}
return true;
}
void Upgrade::SetUpgradeType(uint8_t upgradeType) {
m_upgradeType = upgradeType;
}
uint8_t Upgrade::GetUpgradeType() const {
return m_upgradeType;
}