ToyBlockingActionParser.h
1.88 KB
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
//
// ToyBlockingActionParser.h
// SteveMaggieCpp
//
// Created by Katarzyna Kalinowska-Górska on 31.05.2017.
//
//
#ifndef ToyBlockingActionParser_h
#define ToyBlockingActionParser_h
#include "ToyActionParser.h"
#include "ToyColourableSprite.h"
class ToyBlockingActionParser
{
public:
static ToyBlockingActionParser& getInstance()
{
static ToyBlockingActionParser instance;
return instance;
};
cocos2d::Action* parseJSONAction(const rapidjson::Value& jsonActionObject, ActionParseDelegate* parseDelegate, bool notifyDelegateWhenFinished = true);
protected:
cocos2d::Action* parseCallFunctionWithBlockingAction(const rapidjson::Value& jsonActionObject, ActionParseDelegate* parseDelegate, bool notifyDelegateWhenFinished);
cocos2d::Action* parseWaitForTouchAction(const rapidjson::Value& jsonActionObject, ActionParseDelegate* parseDelegate, bool notifyDelegateWhenFinished);
cocos2d::Action* parseWaitForPaletteComponentAction(const rapidjson::Value& jsonActionObject, ActionParseDelegate* parseDelegate, bool notifyDelegateWhenFinished);
cocos2d::Action* parseWaitForDragAndDropAction(const rapidjson::Value& jsonActionObject, ActionParseDelegate* parseDelegate, bool notifyDelegateWhenFinished);
cocos2d::Action* parseWaitForObjectUnlockAction(const rapidjson::Value& jsonActionObject, ActionParseDelegate* parseDelegate, bool notifyDelegateWhenFinished);
std::function<void()> parseWaitForObjectUnlockActionFunction_ToyColourableSprite(ToyColourableSprite* unlockingObject, const rapidjson::Value& jsonActionObject, ActionParseDelegate* parseDelegate, bool notifyDelegateWhenFinished);
void runCompletingActions(const rapidjson::Value& jsonActionObject, ActionParseDelegate* parseDelegate, int indexForConditionedActions = 0);
};
#endif /* ToyBlockingActionParser_h */