• 大小: 9.6M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-18
  • 语言: 其他
  • 标签: 其他  

资源简介

xyq2d.10.10.zip

资源截图

代码片段和文件信息

/****************************************************************************
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2011      Zynga Inc.
Copyright (c) 2013-2017 Chukong Technologies Inc.

http://www.cocos2d-x.org

Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated documentation files (the “Software“) to deal
in the Software without restriction including without limitation the rights
to use copy modify merge publish distribute sublicense and/or sell
copies of the Software and to permit persons to whom the Software is
furnished to do so subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/

#include “2d/CCAction.h“
#include “2d/CCActionInterval.h“
#include “2d/CCNode.h“
#include “base/CCDirector.h“
//#include “base/ccUTF8.h“

NS_CC_BEGIN
//
// Action base Class
//

Action::Action()
:_originalTarget(nullptr)
_target(nullptr)
_tag(Action::INVALID_TAG)
_flags(0)
{
#if CC_ENABLE_script_BINDING
    scriptEngineProtocol* engine = scriptEngineManager::getInstance()->getscriptEngine();
    _scriptType = engine != nullptr ? engine->getscriptType() : kscriptTypeNone;
#endif
}

Action::~Action()
{
    CCLOGINFO(“deallocing Action: %p - tag: %i“ this _tag);
}

std::string Action::description() const
{
    return “Action“;
}

void Action::startWithTarget(Node *aTarget)
{
    _originalTarget = _target = aTarget;
}

void Action::stop()
{
    _target = nullptr;
}

bool Action::isDone() const
{
    return true;
}

void Action::step(float /*dt*/)
{
    CCLOG(“[Action step]. override me“);
}

void Action::update(float /*time*/)
{
    CCLOG(“[Action update]. override me“);
}

//
// Speed
//
Speed::Speed()
: _speed(0.0)
 _innerAction(nullptr)
{
}

Speed::~Speed()
{
    CC_SAFE_RELEASE(_innerAction);
}

Speed* Speed::create(ActionInterval* action float speed)
{
    Speed *ret = new (std::nothrow) Speed();
    if (ret && ret->initWithAction(action speed))
    {
        ret->autorelease();
        return ret;
    }
    CC_SAFE_DELETE(ret);
    return nullptr;
}

bool Speed::initWithAction(ActionInterval *action float speed)
{
    CCASSERT(action != nullptr “action must not be NULL“);
    if (action == nullptr)
    {
        log(“Speed::initWithAction error: action is nullptr!“);
        return false;
  

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-10-10 11:30  xyq2d\Debug\
     文件     2176512  2017-09-28 14:23  xyq2d\Debug\galaxy2d.dll
     目录           0  2017-10-10 11:29  xyq2d\Debug\libasert\
     文件         785  2017-10-10 11:29  xyq2d\Debug\libasert\libasert.Build.CppClean.log
     文件          96  2017-10-10 11:29  xyq2d\Debug\libasert\libasert.log
     目录           0  2017-10-10 11:29  xyq2d\Debug\libasert\libasert.tlog\
     目录           0  2017-10-09 20:03  xyq2d\Debug\libcoco\
     目录           0  2017-10-07 12:35  xyq2d\Debug\libcoco\2d\
     文件        7655  2017-10-07 11:48  xyq2d\Debug\libcoco\2d\CCAction.cpp
     文件       13867  2017-10-07 11:48  xyq2d\Debug\libcoco\2d\CCAction.h
     文件       13955  2017-04-12 15:00  xyq2d\Debug\libcoco\2d\CCActionCatmullRom.cpp
     文件        9878  2017-04-12 15:00  xyq2d\Debug\libcoco\2d\CCActionCatmullRom.h
     文件       10015  2017-10-07 11:56  xyq2d\Debug\libcoco\2d\CCActionEase.cpp
     文件       14762  2017-04-12 15:00  xyq2d\Debug\libcoco\2d\CCActionEase.h
     文件       12488  2017-10-01 13:40  xyq2d\Debug\libcoco\2d\CCActionInstant.cpp
     文件       14126  2017-10-01 13:40  xyq2d\Debug\libcoco\2d\CCActionInstant.h
     文件       64453  2017-10-07 11:54  xyq2d\Debug\libcoco\2d\CCActionInterval.cpp
     文件       49362  2017-05-17 23:39  xyq2d\Debug\libcoco\2d\CCActionInterval.h
     文件       13675  2017-04-12 15:00  xyq2d\Debug\libcoco\2d\CCActionManager.cpp
     文件        7216  2017-10-01 13:09  xyq2d\Debug\libcoco\2d\CCActionManager.h
     文件        2584  2017-05-17 23:38  xyq2d\Debug\libcoco\2d\CCActionTween.cpp
     文件        4575  2017-04-12 15:00  xyq2d\Debug\libcoco\2d\CCActionTween.h
     文件       56004  2017-10-07 12:35  xyq2d\Debug\libcoco\2d\CCNode.cpp
     文件       74621  2017-10-07 12:22  xyq2d\Debug\libcoco\2d\CCNode.h
     文件       11490  2017-10-07 11:53  xyq2d\Debug\libcoco\2d\CCScene.cpp
     文件        6880  2017-10-07 11:50  xyq2d\Debug\libcoco\2d\CCScene.h
     文件       45661  2017-05-17 23:12  xyq2d\Debug\libcoco\2d\CCTransition.cpp
     文件       30547  2017-05-17 23:10  xyq2d\Debug\libcoco\2d\CCTransition.h
     文件       11621  2017-04-12 15:00  xyq2d\Debug\libcoco\2d\CCTweenFunction.cpp
     文件        6583  2017-04-12 15:00  xyq2d\Debug\libcoco\2d\CCTweenFunction.h
     目录           0  2017-10-08 14:35  xyq2d\Debug\libcoco\base\
............此处省略931个文件信息

评论

共有 条评论