- Home /
Question by
cnelsoniii · Aug 12, 2015 at 05:50 AM ·
scorecountercombo
Score multiplier
I need help designing a score multiplier for an endless 2d runner. How it's suppose to work is if you deliver to customers in succession your multiplier goes up by one. However if you miss a customer your multiplier resets. It seems easy but I'm new to programming and could use some help.
Comment
Answer by allenallenallen · Aug 12, 2015 at 05:53 AM
It is easy. C# version.
float score = 100;
float multiplier = 1.0f;
float finalScore = 0;
multiplier += 1.2f; // Succession
multiplier -= 0.4f; // Failure or whatever you want.
finalScore = score * multiplier;
Your answer
Follow this Question
Related Questions
How to give a bonus every 1000 points? 2 Answers
Trying to get score counter... 2 Answers
On Trigger Enter just triggers once for same object 1 Answer
Scoring (i'm stuck) 3 Answers