-
Notifications
You must be signed in to change notification settings - Fork 0
/
tvScene.h
52 lines (44 loc) · 1.23 KB
/
tvScene.h
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
45
46
47
48
49
50
51
52
#ifndef __TV_SCENE_H__
#define __TV_SCENE_H__
#include "cocos2d.h"
#include "tvplayer/tv_types.h"
class tvScene : public cocos2d::Layer
{
#define SCENE_TV "Scene_tv"
#define LAYER_TV "layer_tv"
public:
// there's no 'id' in cpp, so we recommend returning the class instance pointer
static cocos2d::Scene* createScene();
// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
virtual bool init();
// implement the "static create()" method manually
CREATE_FUNC(tvScene);
public:
/**
* [获取root scene上的layer]
*
* @method getRootLayer
*
* @return [!nullptr==成功,nullptr==失败]
*/
static cocos2d::Node* getRootLayer(void);
/**
* [获取tv play场景的layer]
*
* @method getTvLayer
*
* @return [!nullptr==成功,nullptr==失败]
*/
static cocos2d::Node* getTvLayer(void);
/**
* [信号通道切换。API将实际切换底层通道资源,并同时创建对应的layer node并返回。]
*
* @method sourceEntry
*
* @param source [信号源枚举]
*
* @return [!nullptr==成功,nullptr==失败]
*/
static cocos2d::Node* sourceEntry(SKYTV_INPUT_SOURCE_TYPE source);
};
#endif // __TV_SCENE_H__