public void CreateAttribute(CardAttribute.Type type, int value1, Character target) { GameObject newAttribute = Instantiate(attributePrefab, attributeHolder.position, Quaternion.identity, attributeHolder); CardAttribute attribute = newAttribute.GetComponent <CardAttribute>(); switch (type) { case CardAttribute.Type.Draw: if (side == Side.Enemy && target == FightManager.instance.enemy) { attribute.Setup(attributeIcons[6], value1.ToString(), FightManager.instance.healColor); } if (side == Side.Enemy && target == FightManager.instance.player) { attribute.Setup(attributeIcons[6], value1.ToString(), FightManager.instance.damageColor); } if (side == Side.Player && target == FightManager.instance.enemy) { attribute.Setup(attributeIcons[6], value1.ToString(), FightManager.instance.damageColor); } if (side == Side.Player && target == FightManager.instance.player) { attribute.Setup(attributeIcons[6], value1.ToString(), FightManager.instance.healColor); } break; } }
public void CreateAttribute(CardAttribute.Type type, int value1) { GameObject newAttribute = Instantiate(attributePrefab, attributeHolder.position, Quaternion.identity, attributeHolder); CardAttribute attribute = newAttribute.GetComponent <CardAttribute>(); switch (type) { case CardAttribute.Type.Damage: attribute.Setup(attributeIcons[0], value1.ToString(), FightManager.instance.damageColor); break; case CardAttribute.Type.Heal: attribute.Setup(attributeIcons[1], value1.ToString(), FightManager.instance.healColor); break; case CardAttribute.Type.SpellPower: if (value1 > 0) { attribute.Setup(attributeIcons[5], value1.ToString(), FightManager.instance.healColor); } else { attribute.Setup(attributeIcons[5], value1.ToString(), FightManager.instance.damageColor); } break; case CardAttribute.Type.StealCard: attribute.Setup(attributeIcons[7], value1.ToString(), FightManager.instance.healColor); break; } }
public void CreateAttribute(CardAttribute.Type type, int value1, int value2) { GameObject newAttribute = Instantiate(attributePrefab, attributeHolder.position, Quaternion.identity, attributeHolder); CardAttribute attribute = newAttribute.GetComponent <CardAttribute>(); switch (type) { case CardAttribute.Type.DOT: attribute.Setup(attributeIcons[2], value1.ToString(), attributeIcons[3], value2.ToString(), FightManager.instance.damageColor); break; case CardAttribute.Type.HOT: attribute.Setup(attributeIcons[1], value1.ToString(), attributeIcons[3], value2.ToString(), FightManager.instance.healColor); break; } }