LevelPickerLayer.h
780 Bytes
//
// LevelPickerLayer.h
// HalloweenSpaceInvaders
//
// Created by Katarzyna Kalinowska-Górska on 03/10/2019.
//
#ifndef LevelPickerLayer_h
#define LevelPickerLayer_h
#include "cocos2d.h"
#include "LevelPickerView.h"
class LevelPickerLayer : public cocos2d::LayerColor {
public:
static LevelPickerLayer* create(float width, float height);
void addOnGoPressedCallback(std::function<void()> onGoPressed);
void setOnLevelChangedCallback(std::function<void(int)> p_onLevelChangedCallback);
protected:
LevelPickerView* _levelPickerView;
std::function<void()> _onGoPressedCallback;
std::function<void(int)> _onLevelChangedCallback { [](int){} };
bool init(float width, float height);
};
#endif /* LevelPickerLayer_h */