1 // Brain Party
2 // Copyright (C) 2010 Paul Hudson (http://www.tuxradar.com/brainparty)
3 
4 // Brain Party is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 3
7 // of the License, or (at your option) any later version.
8 
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
13 
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 
18 #ifndef __MOONJUMP_H__
19 #define __MOONJUMP_H__
20 
21 #include "Minigame.h"
22 
23 class BPMiniGame_MoonJump_Sheep {
24 public:
25 	float X;
26 	float Y;
27 	float XSpeed;
28 	float YSpeed;
29 	bool MovingRight;
30 	bool OnScreen;
31 
BPMiniGame_MoonJump_Sheep()32 	BPMiniGame_MoonJump_Sheep() {
33 		X = Y = XSpeed = YSpeed = 0.0f;
34 		MovingRight = true;
35 		OnScreen = false;
36 	}
37 };
38 
39 class BPMiniGame_MoonJump : public BPMiniGame {
40 public:
41 	~BPMiniGame_MoonJump();
42 	BPMiniGame_MoonJump(BPGame* game);
43 	void Start();
44 	int GetWeight();
45 	void Render();
46 	void Tick();
47 	void CreateSheep();
48 	void OnMouseDown();
49 	void OnMouseMove();
50 	void OnMouseUp();
51 
52 protected:
53 	Texture* sfcBackground1;
54 	Texture* sfcBackground2;
55 	Texture* sfcBackground3;
56 	Texture* sfcBackground4;
57 	Texture* sfcBackground5;
58 	Texture* sfcBackground6;
59 
60 	Texture* sfcSheepLeft;
61 	Texture* sfcSheepRight;
62 
63 	BPPList<BPMiniGame_MoonJump_Sheep*> Sheep;
64 
65 	float Y;
66 	int LastCreateTime;
67 	int SheepCreateDelay;
68 
69 	int SuccessTime;
70 };
71 
72 #endif
73