Alice Community  

Go Back   Alice Community > Alice 2 > Share Objects

Reply
 
Thread Tools Display Modes
Score object
Old
davidghemer
Member
 
Status: Offline
Posts: 38
Join Date: Nov 2011
Default Score object - 12-06-2011, 03:36 AM

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.
Attached Files
File Type: a2c Score.a2c (29.9 KB, 42 views)
File Type: a2w scoredemo.a2w (190.4 KB, 36 views)


For video tutorials on programming in Alice 2.2 check out my YouTube channel

http://www.youtube.com/user/drdave785

Also check out my Programming in Alice blog at

http://programminginalice.com
   
Reply With Quote
Reply

Tags
object, score

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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