Isaac 2D  1.0
ITrigger.h
1 // // IsaacFramework //
3 // //////////////////////
4 //
5 // Copyright (c) 2014 Horatiu Condrea
6 //
7 // This software is provided 'as-is', without any express or implied warranty.
8 // In no event will the authors be held liable for any damages arising from the use of this software.
9 //
10 // Permission is granted to anyone to use this software for any purpose, including commercial applications,
11 // and to alter it and redistribute it freely, subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. a
14 // If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
15 //
16 // 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
17 //
18 // 3. This notice may not be removed or altered from any source distribution.
19 //
21 /*
22 Copyright @ 2014
23 Author Horatiu Condrea [ horiacondrea.com ]
24 Revision | Who | Date | Comment
25 ------------------------------------------------------------------------------------------------------------------------------------------
26 1.0 | hc | March 2014 | Created
27 */
28 // Headers
30 #pragma once
31 #include <list>
32 #include <boost/any.hpp>
33 #include <SFML/Graphics.hpp>
34 #include "defines.h"
36 
37 namespace isaac
38 {
39 
43  enum Signs
44  {
45  en_GraterThen,
46  en_LessThen,
47  en_EqualWith,
48  en_UnknowPosition
49  };
50 
54  enum Axis
55  {
56  en_X,
57  en_Y,
58  en_Unknow
59  };
60 
61 
62  class EXPORT_API ITrigger
63  {
64  protected:
65  std::string mc_szTriggerName;
66 
67  public:
68  ITrigger(std::string ac_szTriggerName) : mc_szTriggerName(ac_szTriggerName)
69  {
70  ;
71  }
80  const virtual bool mf_bCheckTrigger(sf::Event event) const = 0;
81 
89  std::string mf_szGetTriggerName() const
90  {
91  return mc_szTriggerName;
92  }
93 
94  virtual ~ITrigger()
95  {
96  //delete mc_szTriggerName;
97  }
98  };
99 
100  typedef std::shared_ptr<const ITrigger> Trigger;
101 }
Definition: BlankScene.cpp:32
std::string mf_szGetTriggerName() const
Definition: ITrigger.h:89
Signs
Definition: ITrigger.h:43
Definition: ITrigger.h:62
Axis
Definition: ITrigger.h:54