1 ////////////////////////////////////////////////////////////////////////////////
2 //            Copyright (C) 2004-2010 by The Allacrost Project
3 //                         All Rights Reserved
4 //
5 // This code is licensed under the GNU GPL version 2. It is free software
6 // and you may modify it and/or redistribute it under the terms of this license.
7 // See http://www.gnu.org/copyleft/gpl.html for details.
8 ////////////////////////////////////////////////////////////////////////////////
9 
10 /** ****************************************************************************
11 *** \file    battle_events.h
12 *** \author  Jacob Rudolph, rujasu@allacrost.org
13 *** \brief   Header file for battle events.
14 ***
15 *** This file contains the header for special events that occur in BattleMode.
16 *** ***************************************************************************/
17 
18 #ifndef __BATTLE_EVENTS_HEADER__
19 #define __BATTLE_EVENTS_HEADER__
20 
21 #include "global.h"
22 #include "system.h"
23 #include "script.h"
24 
25 namespace hoa_battle {
26 
27 class BattleEvent {
28 public:
29 	BattleEvent(uint32 id);
30 
31 	virtual ~BattleEvent();
32 
33 	//! \brief Script Function Accessors
34 	//@{
GetBeforeFunction()35 	ScriptObject* GetBeforeFunction()   { return _before; }
GetDuringFunction()36 	ScriptObject* GetDuringFunction()   { return _during; }
GetAfterFunction()37 	ScriptObject* GetAfterFunction()    { return _after; }
38 	//@}
39 
40 private:
41 	//! \brief unique ID number of event
42 	uint32 _id;
43 
44 	//! \brief The name of the event
45 	hoa_utils::ustring _name;
46 
47 	//! \brief Script that executes at beginning of battle
48 	ScriptObject* _before;
49 	//! \brief Script that executes on calls to BattleMode Update function
50 	ScriptObject* _during;
51 	//! \brief Script that executes when battle is won or lost
52 	ScriptObject* _after;
53 
54 	hoa_system::SystemTimer* _timer;
55 }; // class BattleEvent
56 
57 } // namespace hoa_battle
58 
59 #endif // __BATTLE_EVENTS_HEADER__
60