PuzzleSDK
Bug-Child.h
浏览该文件的文档.
1/****************************************************************************
2 Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
3
4 http://www.cocos2d-x.org
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE SOFTWARE.
23 ****************************************************************************/
24
25//
26// Bug-Child.h
27// cocos2d_tests
28//
29// Created by NiTe Luo on 5/12/14.
30//
31//
32
33#ifndef __Bug_Child__
34#define __Bug_Child__
35
36#include "BugsTest.h"
37
38class BugChild : public BugsTestBase
39{
40public:
42
43 virtual bool init() override;
44 virtual std::string title() const override { return "BugChild";}
45
46 void switchChild(cocos2d::Ref* sender);
47
48protected:
49
50 cocos2d::Sprite* parent1;
51 cocos2d::Sprite* parent2;
52
53 cocos2d::Sprite* child;
54
55 cocos2d::Menu* menu;
56};
57
59{
60public:
62
63 virtual bool init() override;
64 virtual std::string title() const override { return "BugCameraMask";}
65
66 void switchSpriteFlag(cocos2d::Ref* sender);
68 Node* _sprite;
69 cocos2d::Label* _spriteMaskLabel;
70};
71
72#endif /* defined(__Bug_Child__) */
virtual std::string title() const override
Definition: Bug-Child.h:64
void updateSpriteMaskLabel()
Definition: Bug-Child.cpp:142
virtual bool init() override
Definition: Bug-Child.cpp:86
Node * _sprite
Definition: Bug-Child.h:68
cocos2d::Label * _spriteMaskLabel
Definition: Bug-Child.h:69
void switchSpriteFlag(cocos2d::Ref *sender)
Definition: Bug-Child.cpp:128
CREATE_FUNC(BugCameraMask)
virtual bool init() override
Definition: Bug-Child.cpp:37
cocos2d::Sprite * parent1
Definition: Bug-Child.h:50
cocos2d::Menu * menu
Definition: Bug-Child.h:55
virtual std::string title() const override
Definition: Bug-Child.h:44
CREATE_FUNC(BugChild)
cocos2d::Sprite * child
Definition: Bug-Child.h:53
void switchChild(cocos2d::Ref *sender)
Definition: Bug-Child.cpp:70
cocos2d::Sprite * parent2
Definition: Bug-Child.h:51