4 minutes
Tally the Kills
The mission knows you need six kills. It will not tell you what a kill is worth, because to a mission every kill is worth exactly one sixth of a win. A score answers a different question: which run was better. It wants its own bucket.
Names match, so the loader wires the System. Defaults are score: 0 and pointsPerKill: 100.
The whole component
A number you add to and a number you multiply by. There is no list of kills, no per-enemy breakdown, no combo timer. A scoreboard that renders one integer needs one integer.
The name is doing a job. There is already a Score component in the library, the generic per-player one that listens for score.add and goal.scored. This one counts ship kills. Every component in the marketplace shares one flat namespace, so a variant is named for the subgenre it belongs to rather than stealing the bare name from the general case.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.