Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Share Objects (http://www.alice.org/community/forumdisplay.php?f=8)
-   -   Score object (http://www.alice.org/community/showthread.php?t=7738)

davidghemer 12-06-2011 03:36 AM

Score object
 
2 Attachment(s)
Ok, it has probably been done many times before, but here's my simple Score object. No fancy graphics, it just uses 3D text, but includes most of the functionality that would be needed in general for representing the score in a game. The methods provided by this object are
- setScore(thescore)
- showScore
- hideScore
- setScoreText [this generally wouldn't be called directly - think of it as a private method]
- incrementScore and decrementScore
I've also included three boolean-valued functions
- scoreEquals
- scoreAbove
- scoreBelow

There's nothing difficult here, but what I'm hoping I've provided is a simple to use interface, which is a critical part of designing software.


All times are GMT -5. The time now is 10:00 AM.

Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.