RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
34
CAction::CAction
() :
CObject
() {
35
}
36
37
//-----------------------------------------------------------------------------
38
39
CGameObject
*
CAction::getOriginalTarget
()
const
{
40
return
m_originalTarget
;
41
}
42
43
//-----------------------------------------------------------------------------
44
45
void
CAction::startWithTarget
(
CGameObject
*target) {
46
m_originalTarget
=
m_target
= target;
47
}
48
49
//-----------------------------------------------------------------------------
50
51
bool
CAction::isDone
() {
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
73
CFiniteTimeAction::CFiniteTimeAction
() :
CAction
() {
74
}
75
76
//-----------------------------------------------------------------------------
77
78
float
CFiniteTimeAction::getDuration
()
const
{
79
return
m_duration
;
80
}
81
82
//-----------------------------------------------------------------------------
83
84
CFiniteTimeAction
*
CFiniteTimeAction::reverse
() {
85
return
NULL;
86
}
87
88
//-----------------------------------------------------------------------------
89
90
CAction::~CAction
() {
91
}
CAction::update
virtual void update(float t)
Definition:
caction.cpp:68
CAction::getOriginalTarget
CGameObject * getOriginalTarget() const
Definition:
caction.cpp:39
CAction::m_originalTarget
CGameObject * m_originalTarget
Definition:
caction.h:87
CAction::CAction
CAction()
Definition:
caction.cpp:34
CFiniteTimeAction::getDuration
float getDuration() const
Definition:
caction.cpp:78
CGameObject
Definition:
cgameobject.h:46
CAction::step
virtual void step(float dt)
Definition:
caction.cpp:63
CAction::stop
virtual void stop()
Definition:
caction.cpp:57
CAction::m_target
CGameObject * m_target
Definition:
caction.h:95
CFiniteTimeAction::reverse
virtual CFiniteTimeAction * reverse()
Definition:
caction.cpp:84
CFiniteTimeAction::m_duration
float m_duration
Definition:
caction.h:128
CAction::startWithTarget
virtual void startWithTarget(CGameObject *target)
Definition:
caction.cpp:45
CAction::~CAction
virtual ~CAction()
Definition:
caction.cpp:90
CAction
Definition:
caction.h:39
CAction::isDone
virtual bool isDone()
Definition:
caction.cpp:51
CObject
Definition:
cobject.h:46
CFiniteTimeAction
Definition:
caction.h:116
CFiniteTimeAction::CFiniteTimeAction
CFiniteTimeAction()
Definition:
caction.cpp:73
caction.h
rioengine
cengine
caction.cpp
Generated on Mon Jan 12 2015 22:23:58 for RioEngine by
1.8.9.1