RioEngine  0.1
My first attempt to create a 3D WYSIWYG Game Engine
caction.cpp
Go to the documentation of this file.
1 //--------------------------------------------------------------- @License begins
2 // cocos2d for iPhone: http://www.cocos2d-iphone.org
3 // -> This file was ported to C++ by Leopoldo Lomas Flores just for fun.
4 // I suggest you get the official C++ version of this file from:
5 // http://www.cocos2d-x.org/
6 //
7 // Copyright (c) 2008-2011 Ricardo Quesada
8 // Copyright (c) 2011 Zynga Inc.
9 // Copyright (c) 2013-2014 Cocos2D Authors
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining a copy
12 // of this software and associated documentation files (the "Software"), to deal
13 // in the Software without restriction, including without limitation the rights
14 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 // copies of the Software, and to permit persons to whom the Software is
16 // furnished to do so, subject to the following conditions:
17 //
18 // The above copyright notice and this permission notice shall be included in
19 // all copies or substantial portions of the Software.
20 //
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 // THE SOFTWARE.
28 //--------------------------------------------------------------- @License ends
29 
30 #include "cengine/caction.h"
31 
32 // ----------------------------------------------------- CAction implementation
33 
35 }
36 
37 //-----------------------------------------------------------------------------
38 
40  return m_originalTarget;
41 }
42 
43 //-----------------------------------------------------------------------------
44 
46  m_originalTarget = m_target = target;
47 }
48 
49 //-----------------------------------------------------------------------------
50 
52  return true;
53 }
54 
55 //-----------------------------------------------------------------------------
56 
57 void CAction::stop() {
58  m_target = NULL;
59 }
60 
61 //-----------------------------------------------------------------------------
62 
63 void CAction::step(float) {
64 }
65 
66 //-----------------------------------------------------------------------------
67 
68 void CAction::update(float) {
69 }
70 
71 // ------------------------------------------- CFiniteTimeAction implementation
72 
74 }
75 
76 //-----------------------------------------------------------------------------
77 
79  return m_duration;
80 }
81 
82 //-----------------------------------------------------------------------------
83 
85  return NULL;
86 }
87 
88 //-----------------------------------------------------------------------------
89 
91 }
virtual void update(float t)
Definition: caction.cpp:68
CGameObject * getOriginalTarget() const
Definition: caction.cpp:39
CGameObject * m_originalTarget
Definition: caction.h:87
CAction()
Definition: caction.cpp:34
float getDuration() const
Definition: caction.cpp:78
virtual void step(float dt)
Definition: caction.cpp:63
virtual void stop()
Definition: caction.cpp:57
CGameObject * m_target
Definition: caction.h:95
virtual CFiniteTimeAction * reverse()
Definition: caction.cpp:84
float m_duration
Definition: caction.h:128
virtual void startWithTarget(CGameObject *target)
Definition: caction.cpp:45
virtual ~CAction()
Definition: caction.cpp:90
virtual bool isDone()
Definition: caction.cpp:51