Beispiel #1
0
bool PawnMovementAnimation::animate(const Real& timeSinceLastFrame)
{
    Real distanceMoved = MOVEMENT_SPEED * timeSinceLastFrame;
    Vector3 path = mDestination - mAnimatedNode->getPosition();

    if (path.length() > distanceMoved)
    {
        if (path.length() < 280 && mAttackDuration > 0)
        {
            if (!mParticleNode)
            {
                createBlasts();
                mAnimationManager->addAnimation(
                    AnimationFactory::createDyingAnimation(
                    mTargetPiece, mSceneMgr, 2, 1.5));
                mAnimationManager->addAnimation(
                    AnimationFactory::createBleedingAnimation(
                    mTargetPiece, mSceneMgr, 1, 1.5));
            }

            if (mParticleNode->getPosition().y + mTargetPiece->getPosition().y >= 0)
            {
                
                if (mParticleNode->getPosition().y < 200)
                {
                    mTargetPiece->translate(0, -timeSinceLastFrame * 600, 0);
                    mParticleNode->translate(0, -timeSinceLastFrame * 400, 0);
                }
                else
                {
                    mParticleNode->translate(0, -timeSinceLastFrame * 1000, 0);
                }
            }
            else
            {
                playAnimation("eat", timeSinceLastFrame, false, mParticleNode, false);
            }
            mAttackDuration -= timeSinceLastFrame;
        }
        else {
            // Normalising the vector so the speed remains constant.
            path.normalise();
            mAnimatedNode->translate(path * distanceMoved);

            Vector3 src = mAnimatedNode->getOrientation() * Vector3::UNIT_Z;
            mAnimatedNode->rotate(src.getRotationTo(path));

            playAnimation("walk", timeSinceLastFrame);
        }
        return true; // Animation still running.
    }
    resetAnimation("walk");
    mAnimatedNode->setPosition(mDestination);
    mAnimatedNode->setOrientation(mAnimatedNode->getInitialOrientation());
    return false; // Animation finished.
}
Beispiel #2
0
//-------------------------------------------------------------------------------------
void EntitySimple::addTime(Real deltaTime)
{
	if(blocktime_ <= 0.f)
	{
		Ogre::Vector3 currpos = getLastPosition();
		if(kbe_playerID() != mID)
		{
			Ogre::Vector3 movement = destPos_ - currpos;
			float speed = mMoveSpeed * deltaTime;

			movement.y = 0.f;

			Real mlen = movement.length();

			if(mlen < speed || (mLastAnimName != "Run" && mlen <= 1.0f))
			{
				if (mLastAnimName == "Run")
				{
					float y = currpos.y;
					currpos = destPos_;
					currpos.y = y;

					playAnimation("Idle");
				}
			}
			else
			{
				movement.normalise();

				// Òƶ¯Î»ÖÃ
				movement *= speed;
				currpos += movement;
				
				playAnimation("Run");
			}
		}

		blocktime_ = 0.f;
	
		setPosition(currpos.x, currpos.y, currpos.z);
		KBEntity::addTime(deltaTime);
	}
	else
	{
		blocktime_ -= deltaTime;
		playAnimation("Block");
	}

	if(mLastAnims)
		mLastAnims->addTime(deltaTime);
}
//-------------------------------------------------------------------------------------
void EntitySimple::setupAnimations()
{
	if(modelName_ == "ogrehead.mesh")
		return;

	Ogre::AnimationStateSet* aniStetes = mBodyEnt->getAllAnimationStates();
	if(aniStetes != NULL)
	{
		// populate our animation list
		for (int i = 0; i < SIMPLE_NUM_ANIMS; i++)
		{
			if(aniStetes->hasAnimationState(animNames[i]))
			{
				mAnims[i] = mBodyEnt->getAnimationState(animNames[i]);
				mAnims[i]->setLoop(true);
			}
			else
			{
				char c = animNames[i].c_str()[animNames[i].size() - 1];

				if(c > '1' && c <= '9')
				{
					Ogre::String name = animNames[i];

					name.erase(name.size() - 1, 1);
					name += "1";

					mAnims[i] = mBodyEnt->getAnimationState(name);
					mAnims[i]->setLoop(true);
				}
				else
					mAnims[i] = NULL;
			}
		}
	}
	else
	{
		for (int i = 0; i < SIMPLE_NUM_ANIMS; i++)
		{
			mAnims[i] = NULL;
		}
	}

	if(mState != 1)
		playAnimation("Idle");
	else
		playAnimation("Die");
}
void HelloWorld::onMouseDown(Event* event)
{
#ifdef MOUSE_DOUBLE_LISTEN_FUDGE
    mouseDownFudge = !mouseDownFudge;
    if(!mouseDownFudge)
        return;
#endif
    EventMouse* e = (EventMouse*)event;
    isMouseDown[e->getMouseButton()] = true;
    std::stringstream ss;
    ss << "Mouse Down ";
    ss << e->getMouseButton();

    if(e->getMouseButton() == 1)
    {
        if(!getChildByName("animtest"))
        {
            auto s = new O3Sprite("", true);
            addSprite(s);
            s->addAnimation("idle", "animtest", 9, 12);
            s->setAnimation("idle");
            s->playAnimation();
            s->setName("animtest");
        }
        else
        {
            removeChildByName("animtest");
        }
    }
}
void Enemy::chase(sf::Vector2f pos)
{
	action_tree.deleteThread(1);

	Action chase;
	chase.thread_id = 1;
	chase.action = get_action([this, pos](sf::Time dt)
	{

		sf::Vector2f normal = normalize(pos.x - getPosition().x, pos.y - getPosition().y);
		float x = normal.x;
		float y = normal.y;

		if ((isCollisionDirection(Direction::Left) && x < 0.f) || (isCollisionDirection(Direction::Right) && x > 0.f)) { x = 0.f; if (y > 0.f) y = 1.f; else if (y < 0.f)  y = -1.f; }
		if ((isCollisionDirection(Direction::Up) && y < 0.f) || (isCollisionDirection(Direction::Down) && y > 0.f))   { y = 0.f;  if (x > 0.f)x = 1.f;  else if (x < 0.f) x = -1.f; }

		x = x * 100.f * dt.asSeconds();
		y = y * 100.f * dt.asSeconds();

		playAnimation();
		if (x > 0 && abs(x) > abs(y)) { if (getCurrentDirection() != Direction::Right) { setCurrentDirection(Direction::Right); changeAnimation(static_cast<int>(Animations::GoRight)); } }
		if (x < 0 && abs(x) > abs(y)) { if (getCurrentDirection() != Direction::Left) { setCurrentDirection(Direction::Left); changeAnimation(static_cast<int>(Animations::GoLeft)); } }
		if (y > 0 && abs(x) < abs(y)) { if (getCurrentDirection() != Direction::Down) { setCurrentDirection(Direction::Down); changeAnimation(static_cast<int>(Animations::GoDown)); } }
		if (y < 0 && abs(x) < abs(y)) { if (getCurrentDirection() != Direction::Up) { setCurrentDirection(Direction::Up); changeAnimation(static_cast<int>(Animations::GoUp)); } }

		//std::cout <<x << " " << y << std::endl;
		//std::cout << this->isCollisionDirection(Direction::Left) << " " << this->isCollisionDirection(Direction::Right) << " " << isCollisionDirection(Direction::Down) << " " << isCollisionDirection(Direction::Up) << std::endl;

		move(sf::Vector2f(x, y));
		return false;
	});

	pushAction(chase);
}
Beispiel #6
0
void GameSprite::addEvent()
{
	auto listener = EventListenerTouchOneByOne::create();
	listener->onTouchBegan = [this](Touch* touch, Event* event){
		auto location = touch->getLocation();
		if (this->getBoundingBox().containsPoint(location))
		{
			Director::getInstance()->getEventDispatcher()->removeEventListenersForTarget(this);
			this->playAnimation();
			auto act = Sequence::create(FadeOut::create(0.6f), RemoveSelf::create(true), NULL);
			this->runAction(act);
			this->addScore();
			auto effect = Sea::createBubbleExplore();
			effect->setPosition(this->getContentSize().width * 0.5f, this->getContentSize().height * 0.5f);
			this->addChild(effect);
			effect->playAnimation();
			GameData::getInstance()->addArmyInRound(1);
			this->dispatchIfNumIsUp();
		}
		return false;
	};

	Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener, this);

}
Beispiel #7
0
bool Door::open(Object *opener) {
	// TODO: Door::open(): Open in direction of the opener

	if (isOpen() || (_state == kStateDestroyed))
		return true;

	if (isLocked()) {
		playSound(_soundLocked);
		runScript(kScriptFailToOpen, this, opener);
		return false;
	}

	_lastOpenedBy = opener;

	playAnimation(kAnimationDoorOpen1);
	runScript(kScriptOpen, this, opener);

	_state = kStateOpened1;

	// Also open the linked door
	evaluateLink();
	if (_linkedDoor)
		_linkedDoor->open(opener);

	return true;
}
Beispiel #8
0
void PropSpeedupView::onTouchEnded(CCTouch *pTouch, CCEvent *pEvent){
//    if (isTouchInside(m_btnNode, pTouch)){
//        useTool();
//    }else{
        if(m_isDrag == false && m_clickIndex > -1 && m_clickIndex < m_Tools.size()){
            if(isTouchInside(m_nodeProp, pTouch)){
                CCPoint pos = m_scrollView->getContainer()->convertToNodeSpace(m_dragPos);
                m_clickIndex = floor(pos.x / PROP_SPEEDUP_CELL_W);
                if (m_clickIndex > -1 && m_clickIndex < m_Tools.size()) {
                    if(m_lastClickIndex != m_clickIndex){
                        setSelectSpritePosition();
                        playAnimation();
                        m_lastClickIndex=m_clickIndex;
                    }
                }
            }
        }else if(m_isDrag){
//            m_clickIndex = -1;
            autoBoundsScroll();
            m_isDrag=false;
        }
//    }
//    m_btnNode->setScale(1);
    m_isEditNode=false;
}
Beispiel #9
0
void Fighter::kill() {
	//
	_state = exploding;
	playAnimation( "explode", 1, false );

	--_num_lives;
}
Beispiel #10
0
    // Called every frame
    void SpriteActorView::update(float dt)
    {
        ActorView::update(dt);
        
        // If sprite needs to fade, fade according to passed time from last frame
        if (_fadeDuration > 0)
        {
            float fadeDelta = _targetAlpha - _alpha;
            float timeDelta = _fadeDuration / dt;
            setAlpha(_alpha + (fadeDelta / timeDelta));
            
            _fadeDuration -= dt;
        }
        // Check if we need to move
        if (!_isMoving && !_movementQueue.empty()) {
            // std::cout << "SpriteActorView::update - Popping movement " << _movementQueue.front().animationName << std::endl;
            Movement movement = _movementQueue.front();
            _currentMovement = &movement;
                                    
            // Start animation 
            playAnimation(movement.animationName);            
            // Move
            moveTo(movement.target, movement.duration);
            
            _movementQueue.pop_front();
            

            
        } else if (!_isMoving && _movementQueue.empty() && _currentMovement != NULL) {
            // Just finished queue,publish event
            _currentMovement = NULL;
            EventManager::getInstance()->publish("MOVEMENT_QUEUE_ENDED", _agent);
        }
    }
Beispiel #11
0
void CMonster3D::update(float timeSinceLastFrame, Ogre::SceneNode *pCameraNode)
{
   // m_pMonster2D的work動作都在CScene內處理

   if(m_pMonster2D->isChangeAction()) {
      CAction *pNewAction = m_pMonster2D->getCurAction();
      setAnimation(pNewAction->getAnimationName() + "::" + m_pMonsterNode->getName());
   }
   else
      playAnimation(timeSinceLastFrame);

   // 計算Y值, 要黏著3D地形
   Ogre::Vector3 terrianPos(m_pMonster2D->getPosition().fX, 500, m_pMonster2D->getPosition().fY);
   Ogre::Vector3 dir(0, -1, 0);
   Ogre::Ray ray(terrianPos, dir);
   m_terrainHeight = Ogre::Vector3::ZERO;
   m_terrain.getRayPos(ray, m_terrainHeight);

   FPOS pos = m_pMonster2D->getPosition();
   setPosition(pos.fX, m_terrainHeight.y, pos.fY);
   setDirection(m_pMonster2D->getDirection());

   m_nameOverlay.setTitle(m_pMonster2D->getName());
   m_nameOverlay.update(m_pMonsterNode, pCameraNode);
}
Beispiel #12
0
void Fighter::revive() {
	//
	_state = alive;
	playAnimation( "frame_0", 0, false );

	_timer->Pause( true );
}
Beispiel #13
0
void Alien::kill() {
	//
	//SpaceInvadersEntity::kill();
	_state = exploding;
	
	playAnimation( "explode", 2, false );
}
Beispiel #14
0
Player::Player(Graphics &graphics, float x, float y):
  AnimatedSprite(graphics, "content/sprites/MyChar.png",0,0,16,16,
  x,y,100){
    graphics.loadImage("content/sprites/MyChar.png");
    setupAnimations();
    playAnimation("RunRight");
}
Beispiel #15
0
void AllianceIntroTip::setAutoChangeText(std::vector<string> mTextID, int delayTime, int playTime){
    m_dialogID = mTextID;
    m_delayTime = delayTime;
    m_showTime = playTime;
    changeText();
    playAnimation();
    this->runAction(CCRepeatForever::create(CCSequence::create(CCDelayTime::create(m_showTime+0.3+1),CCCallFunc::create(this,callfunc_selector(AllianceIntroTip::changeText)),CCDelayTime::create(m_delayTime + 0.3-1),NULL)));
}
Beispiel #16
0
EnemyForwardAttack::EnemyForwardAttack(float x,
                                       float y) :
    Ship("enemy_01.png", 3, 1, x, y, 180.0f)
{
    addAnimation("idle", 1, 1, 1.0f);
    playAnimation("idle");
    setVelocity(sf::Vector2f(-200.0f, 0.0f));
}
Beispiel #17
0
tMenuOption showTitles() {
/* Show the titles animation
 * returns 0 if the user has finished the animations with quit
 * returns 1 if the user has selected to load a saved game 
 * returns 2 if the user has selected to start the game
 */
	return playAnimation(ANIMS_ID_PRESENTATION);
}	
Beispiel #18
0
void PrincessModel::playMakeUpEndAniAndParticle(bool save, const char * animalName)
{
	if (!save)
		return;

	playAnimation(animalName, false, 1);
	playMakeupParticle(MAKEUP_PARTICLE, 1);
}
bool ImprovedAnimationManager::play(std::string name)
{
	for(unsigned int i = 0; i < _amv.size(); i++)
		if(_amv[i] == name)
			_focus = i;
	std::cout << "Play " << name << std::endl;
	playAnimation(_map[name].get());
	return true;
}
Beispiel #20
0
void E002_C030_P130::startFlashAnimation()
{
    createAllAnimations();
    
    CJAnimation *ani = playAnimation("MEERKAT", "e002_c030_p130_flash_reward_mk_action", 1, kDepth6_dimmed);
    
    addNarrationOnFlashFrame(ani, 20, getFilePath("snd","e002_c030_p230_snd_01_mk.mp3").c_str());
    addEffectOnFlashFrame(ani, 0, getFilePath("snd","e002_c030_p130_sfx_appear_mk.mp3").c_str());
    addEffectOnFlashFrame(ani, 169, getFilePath("snd","e002_c030_p130_sfx_appear_mk.mp3").c_str());

}
Beispiel #21
0
void PrincessModel::onCompletedListener( int trackIndex, int loopCount )
{
	if (trackIndex == 1 && loopCount == 1)
	{
		std::string name = m_skeleton->getAnimationName(trackIndex);
		if (!WJUtils::equals(m_playNameWithChannel1.c_str(), name.c_str()))
		{
			playAnimation(m_playNameWithChannel1.c_str(), true, 1);
		}
	}
}
bool ImprovedAnimationManager::play()
{
	if(_focus < _amv.size())
	{
		std::cout << "Play " << _amv[_focus] << std::endl;
		playAnimation(_map[_amv[_focus]].get());
		return true;
	}

	return false;
}
Beispiel #23
0
void Walker::nextWork(int pointType)
{
    CCCallFunc * fun1 = CCCallFunc::create(this, callfunc_selector(Walker::onWorkFinished));
    WalkerActionStatus s = WALKER_ACTION_MOVE;
    if(pointType == POINT_TYPE_REST)
        s = WALKER_ACTION_REST;
    if(pointType == POINT_TYPE_WAVE)
        s = WALKER_ACTION_WAVE;
    if(pointType == POINT_TYPE_WORK)
        s = WALKER_ACTION_WORK;
    playAnimation(s, 0.1, fun1, 3);
}
Beispiel #24
0
void PlatformDemoState::addPlayer()
{
    auto body = xy::Component::create<xy::Physics::RigidBody>(m_messageBus, xy::Physics::BodyType::Dynamic);
    xy::Physics::CollisionRectangleShape cs({ 120.f, 240.f });
    cs.setFriction(0.6f);
    cs.setDensity(0.9f);

    body->fixedRotation(true);
    body->addCollisionShape(cs);

    auto controller = xy::Component::create<Plat::PlayerController>(m_messageBus);

    auto camera = xy::Component::create<xy::Camera>(m_messageBus, getContext().defaultView);
    camera->lockTransform(xy::Camera::TransformLock::AxisY);
    camera->lockBounds({ 0.f,0.f, 2816.f, 1080.f });

    auto model = m_meshRenderer.createModel(MeshID::Batcat, m_messageBus);
    model->setBaseMaterial(m_meshRenderer.getMaterial(MatId::BatcatMat));
    model->rotate(xy::Model::Axis::X, 90.f);
    model->rotate(xy::Model::Axis::Z, -90.f);
    model->setPosition({ 60.f, 240.f, 0.f });
    model->playAnimation(1, 0.2f);

    auto entity = xy::Entity::create(m_messageBus);
    entity->setPosition(960.f, 540.f);
    entity->addComponent(body);
    entity->addComponent(model);
    playerController = entity->addComponent(controller);
    playerCamera = entity->addComponent(camera);
    m_scene.setActiveCamera(playerCamera);
    m_scene.addEntity(entity, xy::Scene::Layer::FrontMiddle);

    body = xy::Component::create<xy::Physics::RigidBody>(m_messageBus, xy::Physics::BodyType::Dynamic);
    body->fixedRotation(true);
    cs.setRect({ 200.f, 300.f });
    body->addCollisionShape(cs);
    cs.setRect({ 80.f, 80.f }, { 60.f, -80.f });
    body->addCollisionShape(cs);

    model = m_meshRenderer.createModel(MeshID::Fixit, m_messageBus);
    model->setSubMaterial(m_meshRenderer.getMaterial(MatId::MrFixitBody), 0);
    model->setSubMaterial(m_meshRenderer.getMaterial(MatId::MrFixitHead), 1);
    model->rotate(xy::Model::Axis::X, 90.f);
    model->rotate(xy::Model::Axis::Z, 90.f);
    model->setScale({ 50.f, 50.f, 50.f });
    model->setPosition({ 100.f, 300.f, 0.f });

    entity = xy::Entity::create(m_messageBus);
    entity->setPosition(1320.f, 40.f);
    entity->addComponent(model);
    entity->addComponent(body);
    m_scene.addEntity(entity, xy::Scene::Layer::FrontMiddle);
}
Beispiel #25
0
void Alien::changeAnimationFrame() {
	// if the alien is not dead
	if ( _state == alive ) {
		++_current_frame;
		_current_frame %= 2;
	
		char buffer[256];
		itoa( _current_frame, buffer, 10 );

		playAnimation( "frame_" + String( buffer ), _current_frame, false );
	}
}
Beispiel #26
0
void Missile::AI(Map *map)
{
	x += speed;
	if(eState == eDestroyed)
	{
		y += fall;
		if(map->checkGlobalHitBox((RectangleObject)*this))
		{
			initialize();
		}
	}
	playAnimation();
}
Beispiel #27
0
void Main::onInitialize() {
    auto scene = addScene(new dt::Scene("testscene"));

    dt::ResourceManager::get()->addResourceLocation("sinbad.zip","Zip", true);
    dt::ResourceManager::get()->addResourceLocation("particle/","FileSystem", true);
    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();

    // make a scene
    auto camnode = scene->addChildNode(new dt::Node("camnode"));
    camnode->setPosition(Ogre::Vector3(0, 2, 10));
    camnode->addComponent(new dt::CameraComponent("cam"))->lookAt(Ogre::Vector3(0, 2, 0));;

    auto p = scene->addChildNode(new dt::Node("p"));

    p->setScale(0.2);
    auto mesh = p->addComponent(new dt::MeshComponent("Sinbad.mesh"));
    mesh->setAnimation("RunBase");
    mesh->setLoopAnimation(true);
    mesh->playAnimation();

    auto path =
        p->addComponent(new dt::FollowPathComponent(dt::FollowPathComponent::LOOP));
    path->addPoint(Ogre::Vector3(-10, 0, 0));
    path->addPoint(Ogre::Vector3(10, 0, 0));
    path->setDuration(2.f);
    path->setFollowRotation(true);

    // create the particle system
    auto p_sys = p->addComponent(new dt::ParticleSystemComponent("p_sys"));
    p_sys->setMaterialName("Test/Particle");
    p_sys->setParticleCountLimit(1000);
    p_sys->getOgreParticleSystem()->setDefaultDimensions(0.03, 0.03);

    Ogre::ParticleEmitter* e = p_sys->addEmitter("emit1", "Point");
    e->setAngle(Ogre::Degree(10));
    e->setColour(Ogre::ColourValue(1.f, 0.6f, 0.f), Ogre::ColourValue(0.2f, 0.8f, 0.2f));
    e->setEmissionRate(100);
    e->setParticleVelocity(3.f, 4.f);
    e->setTimeToLive(1.f, 2.f);

    p_sys->addScalerAffector("scaler", 1.05);
    p_sys->addLinearForceAffector("force", Ogre::Vector3(0, 5, 0));

    Ogre::ParticleAffector* a = p_sys->addAffector("colour_interpolator", "ColourInterpolator");
    a->setParameter("time0", "0");
    a->setParameter("colour0", "1 1 0 1");
    a->setParameter("time1", "0.5");
    a->setParameter("colour1", "1 0.3 0 1");
    a->setParameter("time2", "1");
    a->setParameter("colour2", "1 0 0 0");
}
Beispiel #28
0
//------------------------------------------
Enemy::Enemy(const Ogre::String& meshName,const Ogre::String& headMesh,const Ogre::Vector3& pos, Ogre::SceneNode* pParent)
:m_pEntity(NULL),m_pNode(NULL),m_pSceneMrg(pParent->getCreator()),m_pAniSate(NULL),m_LifeValue(30),m_State(ES_NORMAL),m_Rotate(0),
m_pHeadEnity(NULL),m_HurtTime(0.0f),m_Trans(0.0f,0.0f,0.0f),m_AniFade(0.0f),m_pMouthEntity(NULL),m_pSwallow(NULL)
{

	m_pEntity=m_pSceneMrg->createEntity("Enemy"+Ogre::StringConverter::toString(m_EntityIndex++),meshName);
	m_pNode=pParent->createChildSceneNode();
	m_pNode->attachObject(m_pEntity);
	m_pNode->setPosition(pos);

	bool b=m_pEntity->hasSkeleton();

	if(headMesh.empty()==false)
	{
		m_pHeadEnity=m_pSceneMrg->createEntity(headMesh);
        assert(m_pHeadEnity);
		m_pNode->attachObject(m_pHeadEnity);
		m_pHeadEnity->shareSkeletonInstanceWith(m_pEntity);


		///加载嘴部模形,用于检查是否击中嘴部

		m_pMouthEntity=m_pSceneMrg->createEntity("mouth.mesh");
		m_pMouthEntity->shareSkeletonInstanceWith(m_pEntity);
		m_pNode->attachObject(m_pMouthEntity);
		m_pMouthEntity->setVisible(false);
		


	}

	m_pEntity->setQueryFlags(EnemyMask);
	m_pAniSate=NULL;
	m_pMaterial=m_pEntity->getSubEntity(0)->getMaterial();



	//m_pMouthEntity=m




	///播放休闲动作
   playAnimation(g_idleAni,true,0);

  



}
Beispiel #29
0
void E002_C030_P130::onComplete()
{
    playEffect(NULL, 13);
    CJAnimation *ani = playAnimation("MEERKAT", "e002_c030_p130_flash_reward_action", 1, kDepth4_title-1);
    
    addNarrationOnFlashFrame(ani, 203 - 179, getFilePath("snd","e002_c030_p000_snd_s_07_01_ar.mp3").c_str());
    addNarrationOnFlashFrame(ani, 203 - 179, getFilePath("snd","e002_c030_p000_snd_s_07_01_as.mp3").c_str());
    addNarrationOnFlashFrame(ani, 203 - 179, getFilePath("snd","e002_c030_p000_snd_s_07_01_bb.mp3").c_str());
    
    addEffectOnFlashFrame(ani, 179-179, getFilePath("snd","e002_c030_p130_sfx_run_all.mp3").c_str());

    //addEffectOnFlashFrame(ani, 228-179, getFilePath("snd","e002_c030_p130_sfx_run01.mp3").c_str());
    //addEffectOnFlashFrame(ani, 305-179, getFilePath("snd","e002_c030_p130_sfx_plane_ar.mp3").c_str());

}
Beispiel #30
0
bool Placeable::close(Object *closer) {
	if (!_hasInventory)
		return false;

	if (!isOpen())
		return true;

	_lastClosedBy = closer;

	playAnimation(kAnimationPlaceableClose);
	runScript(kScriptClosed, this, closer);

	_state = kStateClosed;

	return true;
}