Scorekeeper - Styxling/Feather GitHub Wiki

Helps keep track of scores for the current game mode. Scores are replicated to clients by way of attributes on an ObjectValue referred to as a 'pointer'

The pointer is stored in

workspace.MapData.TermData

The pointer's Value property is set to a team established in the class constructor.

Scores are stored in the 'scores' property of this class.

EXAMPLE:

newKeeper = Scorekeeper.new(game.Teams.Raiders)
newKeeper.score.points = 0
newKeeper.score.kos = 0
newKeeper.score.wos = 0
newKeeper:updateAttributes() -- Apply scores as attributes to the pointer
Scorekeeper.new(team : Team)
	-- Creates a new Scorekeeper class
	-- 'team' is the team that the scores are being tracked for

Scorekeeper:updateAttributes()
	-- Updates attributes on the pointer

Scorekeeper:destroy()
	-- Destroys the class, including the pointer

Parent

Gamemode