My Project
 
Loading...
Searching...
No Matches
speck.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4
5#include "image.h"
6#include "emitter.h"
7#include "texturefilm.h"
8
9class Speck :public Image{
10public:
11 static const int HEALING = 0;
12 static const int STAR = 1;
13 static const int LIGHT = 2;
14 static const int QUESTION = 3;
15 static const int UP = 4;
16 static const int SCREAM = 5;
17 static const int BONE = 6;
18 static const int WOOL = 7;
19 static const int ROCK = 8;
20 static const int NOTE = 9;
21 static const int CHANGE = 10;
22 static const int HEART = 11;
23 static const int BUBBLE = 12;
24 static const int STEAM = 13;
25 static const int COIN = 14;
26
27 static const int DISCOVER = 101;
28 static const int EVOKE = 102;
29 static const int MASTERY = 103;
30 static const int KIT = 104;
31 static const int RATTLE = 105;
32 static const int JET = 106;
33 static const int TOXIC = 107;
34 static const int PARALYSIS = 108;
35 static const int DUST = 109;
36 static const int FORGE = 110;
37 static const int CONFUSION = 111;
38
39private:
40 static const int SIZE = 7;
41
42 float lifespan;
43 float left;
44
45 static TextureFilm* film;
46
47 static std::map<int, Emitter::Factory*> factories;
48
49 static Emitter::Factory* get(int type);
50public:
51 int type;
52
53 Speck();
54 void reset(int index, float x, float y, int type);
55 virtual void update();
56
57 static Emitter::Factory* factory(int type);
58 static Emitter::Factory* factory(int type, bool lightMode);
59};
static const int PARALYSIS
Definition speck.h:34
static const int EVOKE
Definition speck.h:28
Speck()
Definition speck.cpp:9
static const int HEART
Definition speck.h:22
static const int DISCOVER
Definition speck.h:27
static const int TOXIC
Definition speck.h:33
static const int STAR
Definition speck.h:12
static const int BUBBLE
Definition speck.h:23
static Emitter::Factory * factory(int type)
Definition speck.cpp:394
static const int FORGE
Definition speck.h:36
virtual void update()
Definition speck.cpp:275
static const int LIGHT
Definition speck.h:13
static const int COIN
Definition speck.h:25
static const int QUESTION
Definition speck.h:14
static const int RATTLE
Definition speck.h:31
static const int MASTERY
Definition speck.h:29
void reset(int index, float x, float y, int type)
Definition speck.cpp:23
static const int BONE
Definition speck.h:17
static const int ROCK
Definition speck.h:19
static const int DUST
Definition speck.h:35
static const int STEAM
Definition speck.h:24
static const int UP
Definition speck.h:15
static const int CONFUSION
Definition speck.h:37
static const int HEALING
Definition speck.h:11
static const int JET
Definition speck.h:32
static const int WOOL
Definition speck.h:18
static const int SCREAM
Definition speck.h:16
int type
Definition speck.h:51
static const int NOTE
Definition speck.h:20
static const int CHANGE
Definition speck.h:21
static const int KIT
Definition speck.h:30