topical media & game development
actionscript-zoo-lib-Sushi.ax
actionscript-zoo-lib-Sushi.ax
[swf]
flex
package {
// The @ax-actionscript-zoo-lib-Sushi class represents one of the types of food a pet can eat
public class @ax-actionscript-zoo-lib-Sushi extends actionscript_zoo_lib_Food {
// The amount of calories in a @ax-actionscript-zoo-lib-Sushi object, if no specific
// amount is indicated
private static var DEFAULT_CALORIES:int = 500;
// Constructor
public function @ax-actionscript-zoo-lib-Sushi (initialCalories:int = 0) {
// If no valid calorie amount is specified...
if (initialCalories <= 0) {
// ...give this @ax-actionscript-zoo-lib-Sushi object the default amount
initialCalories = @ax-actionscript-zoo-lib-Sushi.DEFAULT_CALORIES;
}
// Invoke the Food class constructor
super(initialCalories);
// Give this food item a name
setName("@ax-actionscript-zoo-lib-Sushi");
}
}
}
(C) Æliens
27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.