sushi.as
来自「精通Actionscript 3.0 书籍源代码 非常实用」· AS 代码 · 共 22 行
AS
22 行
package zoo { // The Sushi class represents one of the types of food a pet can eat public class Sushi extends Food { // The amount of calories in a Sushi object, if no specific // amount is indicated private static var DEFAULT_CALORIES:int = 500; // Constructor public function Sushi (initialCalories:int = 0) { // If no valid calorie amount is specified... if (initialCalories <= 0) { // ...give this Sushi object the default amount initialCalories = Sushi.DEFAULT_CALORIES; } // Invoke the Food class constructor super(initialCalories); // Give this food item a name setName("Sushi"); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?