JNR
stageJRGame.h
1 /*
2 
3 Jump'n'Run Engine
4 http://www.atanaslaskov.com/jnr/
5 
6 BSD LICENSE
7 Copyright (c) 2007-2013, Atanas Laskov
8 All rights reserved.
9 
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions are met:
12 1. Redistributions of source code must retain the above copyright notice,
13 this list of conditions and the following disclaimer.
14 2. Redistributions in binary form must reproduce the above copyright notice,
15 this list of conditions and the following disclaimer in the documentation
16 and/or other materials provided with the distribution.
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL ATANAS LASKOV BE LIABLE FOR ANY
21 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 
28 */
29 #ifndef M_BLOCKHOP_H
30 #define M_BLOCKHOP_H
31 
33 
34 
40 
41 class stageJRGame: public stageJR
42 {
43 protected:
44 
45  // Timing
46  //
47  double _dPlayTime;
48 
49  laTimeTrig _ttJump;
50  laMultiKey _mkSomersault;
51  unsigned _nJump;
52 
53  laMultiKey _mkAttack;
54  laMultiKey _mkQuickAttack;
55  unsigned _nQuickAttack;
56 
57  laTimeTrig _ttMenu;
58 
59  cuiProgressBar _uiPlayerHP;
60  laTexture _nGUITex_Health;
61  laTexture _nGUITex_XP;
62  laTexture _nGUITex_Skill;
63 
64  // Cinematic mode
65  //
66  fxShutter _shutterCinematic;
67  fxShutter _shutterMenu;
68 
69  // Message handlers
70  //
71  virtual void onInit();
72  virtual void onActivate();
73  virtual void onDeactivate();
74 
75  // Internal sub-routines
76  //
77  virtual void _init_gui();
78  virtual void _draw_UI(laRenderer *pr, laTimer *pt);
79  virtual void _animate(laInputManager *pi, laTimer *pt);
80 
81  void _animate_GUI(laInputManager *pi, laTimer *pt);
82  void _animate_PlayerControls(laInputManager *pi, laTimer *pt);
83 
84 public:
85  // Cinemetic FX
86  void enableCinematicMode(M_BOOL bOn = M_TRUE) { _shutterCinematic.activate(bOn); };
87 
88 public:
89  stageJRGame();
90  ~stageJRGame(void);
91 };
93 #endif
JR Gameplay Stage.
Definition: stageJRGame.h:41
2D Texture
Definition: laTexture.h:45
Time-triggered events.
Definition: laTimeTrig.h:41
Virtual interface for the Engine graphics renderer.
Definition: laRenderer.h:98
Handling Multiple Key Presses.
Definition: laMultiKey.h:49