mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-09 06:12:34 -05:00
18 lines
No EOL
404 B
JavaScript
18 lines
No EOL
404 B
JavaScript
var Person = makeClass(
|
|
/**
|
|
@scope Person
|
|
*/
|
|
{
|
|
/**
|
|
This is just another way to define a constructor.
|
|
@constructs
|
|
@param {string} name The name of the person.
|
|
*/
|
|
initialize: function(name) {
|
|
this.name = name;
|
|
},
|
|
say: function(message) {
|
|
return this.name + " says: " + message;
|
|
}
|
|
}
|
|
); |