Blame view

ios/Runner/Wowgame/Classes/game_halloween/HSimpleValue.h 1.76 KB
cb213901   xiaoyu   添加一个游戏的源码和编译选项
1
  //
5daad4bc   xiaoyu   游戏源码添加编译(现存问题:游戏内...
2
  //  HSimpleValue.h
cb213901   xiaoyu   添加一个游戏的源码和编译选项
3
4
5
6
7
8
  //  SteveMaggieCpp
  //
  //  Created by Katarzyna Kalinowska-Górska on 01.06.2017.
  //
  //
  
5daad4bc   xiaoyu   游戏源码添加编译(现存问题:游戏内...
9
10
  #ifndef HSimpleValue_h
  #define HSimpleValue_h
cb213901   xiaoyu   添加一个游戏的源码和编译选项
11
12
13
14
15
16
  
  #include "cocos2d.h"
  #include <stdio.h>
  #include <string>
  
  //TODO getType
5daad4bc   xiaoyu   游戏源码添加编译(现存问题:游戏内...
17
  class HSimpleValue : public cocos2d::Ref
cb213901   xiaoyu   添加一个游戏的源码和编译选项
18
19
20
  {
      public:
      
5daad4bc   xiaoyu   游戏源码添加编译(现存问题:游戏内...
21
          HSimpleValue(const HSimpleValue& val){
cb213901   xiaoyu   添加一个游戏的源码和编译选项
22
23
24
25
26
27
              _stringValue = val._stringValue;
              _numberValue = val._numberValue;
              _boolValue = val._boolValue;
              _pointValue = val._pointValue;
          };
      
5daad4bc   xiaoyu   游戏源码添加编译(现存问题:游戏内...
28
          HSimpleValue(std::string stringValue) {
cb213901   xiaoyu   添加一个游戏的源码和编译选项
29
30
31
             _stringValue = stringValue;
          };
      
5daad4bc   xiaoyu   游戏源码添加编译(现存问题:游戏内...
32
          HSimpleValue(float number){
cb213901   xiaoyu   添加一个游戏的源码和编译选项
33
34
35
             _numberValue = number;
          };
      
5daad4bc   xiaoyu   游戏源码添加编译(现存问题:游戏内...
36
          HSimpleValue(bool boolValue){
cb213901   xiaoyu   添加一个游戏的源码和编译选项
37
38
39
             _boolValue = boolValue;
          };
      
5daad4bc   xiaoyu   游戏源码添加编译(现存问题:游戏内...
40
          HSimpleValue(cocos2d::Point point){
cb213901   xiaoyu   添加一个游戏的源码和编译选项
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
             _pointValue = point;
          };
      
          virtual std::string getPropertyAsString(std::string propertyName = ""){
              if(propertyName == ""){
                  return _stringValue;
              }
              return "NULL";
          };
      
          float getNumberValue(){
              return _numberValue;
          }
      
          bool getBoolValue(){
              return _boolValue;
          }
      
          cocos2d::Point getPointValue(){
              return _pointValue;
          }
  
          std::string getStringValue(){
              return _stringValue;
          }
      
          void setBoolValue(bool pBoolValue){
              _boolValue = pBoolValue;
          }
      
          void setNumberValue(float pNumberValue){
              _numberValue = pNumberValue;
          }
      
      protected:
          std::string _stringValue;
          float _numberValue;
          cocos2d::Point _pointValue;
          bool _boolValue;
  };
  
  #endif /* SimpleString_h */