-
Notifications
You must be signed in to change notification settings - Fork 0
/
Item.h
44 lines (37 loc) · 669 Bytes
/
Item.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
//
// Item.h
// goldMiner
//
// Created by student on 15/8/19.
//
//
#ifndef __goldMiner__Item__
#define __goldMiner__Item__
typedef enum{
item_large=0,
item_middle,
item_small
}BigType;
typedef enum{
gold=0,
stone,
diamond,
secret
}ItemType;
#include <stdio.h>
#include <iostream>
#include <cocos2d.h>
USING_NS_CC;
class Item :public Sprite{
public:
static Item* createItem();
virtual bool init();
void ItemLoaction(ItemType type,BigType bigType);
ItemType _type;
BigType bigType;
Sprite *sprite;
int score;
int weight;
bool itemAction;
};
#endif /* defined(__goldMiner__Item__) */