Answers for "Adding the values of two functions together to display the total"
http://answers.unity.com/questions/766145/adding-the-values-of-two-functions-together-to-dis.html
The latest answers for the question "Adding the values of two functions together to display the total"Answer by Kiwasi
http://answers.unity.com/answers/766347/view.html
This is also valid:
public float TotalScoreLeft (int playerScoreLeft)
{
float totalScoreLeft = playerScoreLeft;
return totalScoreLeft
}
public float TotalScoreRight (int playerScoreRight)
{
float totalScoreRight = playerScoreRight;
return totalScoreRight
}
public void TotalScore (int totalScoreRight, int totalScoreLeft)
{
totalScore = TotalScoreRight(totalScoreRight) + TotalScoreLeft(totalScoreLeft);
}
I assume this is pseudo code and the actual code is more complex. Otherwise there is no real value to having three methods to add together two floats.Thu, 07 Aug 2014 20:07:02 GMTKiwasi