Ejemplo n.º 1
0
	//---------------------------------------------------------------------
	Skill & Skill::operator = (const Skill &rhs)
	{
		removeAllAnimationEffectInfos();

		// Copy effect infos
		unsigned int i;
		for(i = 0; i < rhs.getNumAnimationEffectInfos(); ++i)
		{
			AnimationEffectInfo *rhsAEI = rhs.getAnimationEffectInfo(i);
			AnimationEffectInfo *newAEI = addAnimationEffectInfo();

			assert ( rhsAEI && newAEI );

		//	rhsAEI->copyParametersTo(newAEI);
            rhsAEI->copyParameters(*newAEI);
		}

		removeAllAnimationRibbons();

		// copy ribbons
		for(i = 0; i < rhs.getNumAnimationRibbons(); ++i)
		{
			AnimationRibbon *rhsAEI = rhs.getAnimationRibbon(i);
			AnimationRibbon *newAEI = addAnimationRibbon();

			assert ( rhsAEI && newAEI );

		//	rhsAEI->copyParametersTo(newAEI);
            rhsAEI->copyParameters(*newAEI);
		}

		removeAllAnimationSounds();

		// copy sounds
		for(i = 0; i < rhs.getNumAnimationSounds(); ++i)
		{
			AnimationSound *rhsAEI = rhs.getAnimationSound(i);
			AnimationSound *newAEI = addAnimationSound();

			assert ( rhsAEI && newAEI );
            rhsAEI->copyParameters(*newAEI);
		}

        removeAllAnimationSceneLightInfos();

        // Copy light infos
        for(i = 0; i < rhs.getNumAnimationSceneLightInfos(); ++i)
        {
            AnimationSceneLightInfo *rhsAEI = rhs.getAnimationSceneLightInfo(i);
            AnimationSceneLightInfo *newAEI = addAnimationSceneLightInfo();

            assert ( rhsAEI && newAEI );

            rhsAEI->copyParameters(*newAEI);
        }

		 removeAllAnimationBulletFlows();

        // Copy blullet flows
        for(i = 0; i < rhs.getNumAnimationBulletFlows(); ++i)
        {
            AnimationBulletFlow *rhsAEI = rhs.getAnimationBulletFlow(i);
            AnimationBulletFlow *newAEI = addAnimationBulletFlow();

            assert ( rhsAEI && newAEI );

            rhsAEI->copyParameters(*newAEI);
        }

		removeAllAnimationCameraShakes();
		// Copy camera shakes
		for(i = 0; i < rhs.getNumAnimationCameraShake(); ++i)
		{
			AnimationCameraShake *rhsAEI = rhs.getAnimationCameraShake(i);
			AnimationCameraShake *newAEI = addAnimationCameraShake();

			assert ( rhsAEI && newAEI );

			rhsAEI->copyParameters(*newAEI);
		}

		// copy skill parameter
	//	rhs.copyParametersTo(this);
        rhs.copyParameters(this);

		return *this;
	}