Example #1
0
 void RemoveSynergyEffect(SynergyType type, int wagonIndex)
 {
     if (type == SynergyType.Attraction)
     {
         PlayerSaveData.reference.wagonData [wagonIndex].attraction       -= PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction;
         PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction = 0;
     }
     else if (type == SynergyType.MagicPower)
     {
         PlayerSaveData.reference.trainData.magicPower -= PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower;
         PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower = 0;
     }
 }
Example #2
0
 void ApplySynergyEffect(SynergyType type, int wagonIndex, int itemsCount)
 {
     //Debug.Log ("applying synergy");
     if (type == SynergyType.Attraction)
     {
         PlayerSaveData.reference.wagonData [wagonIndex].attraction       -= PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction;
         PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction = itemsCount * synergyModifier * PlayerSaveData.reference.wagonData [wagonIndex].attraction / 100;
         PlayerSaveData.reference.wagonData [wagonIndex].attraction       += PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction;
     }
     else if (type == SynergyType.MagicPower)
     {
         PlayerSaveData.reference.trainData.magicPower -= PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower;
         PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower = itemsCount * synergyModifier * PlayerSaveData.reference.trainData.magicPower / 100;
         PlayerSaveData.reference.trainData.magicPower += PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower;
     }
 }
	void RemoveSynergyEffect(SynergyType type, int wagonIndex)
	{
		if (type == SynergyType.Attraction) {
			PlayerSaveData.reference.wagonData [wagonIndex].attraction -= PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction;
			PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction = 0;
		} else if (type == SynergyType.MagicPower) {
			PlayerSaveData.reference.trainData.magicPower -= PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower;
			PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower = 0;
		}

	}
	void ApplySynergyEffect(SynergyType type, int wagonIndex, int itemsCount)
	{
		//Debug.Log ("applying synergy");
		if (type == SynergyType.Attraction) {
			PlayerSaveData.reference.wagonData [wagonIndex].attraction -= PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction;
			PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction = itemsCount * synergyModifier * PlayerSaveData.reference.wagonData [wagonIndex].attraction / 100;
			PlayerSaveData.reference.wagonData [wagonIndex].attraction += PlayerSaveData.reference.wagonData [wagonIndex].synergyAttraction;
		} else if (type == SynergyType.MagicPower) {
			PlayerSaveData.reference.trainData.magicPower -= PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower;
			PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower = itemsCount * synergyModifier * PlayerSaveData.reference.trainData.magicPower / 100;
			PlayerSaveData.reference.trainData.magicPower += PlayerSaveData.reference.wagonData [wagonIndex].synergyMagicPower;
		}

	}