|
// MiniScript is prototype based
|
|
Weapon = { "name": "Sword", "damage": 3 }
|
|
Weapon.slice = function()
|
|
print "Did " + self.damage + " damage with " + self.name
|
|
end function
|
|
|
|
wep = new Weapon // Same as: wep = { "__isa": Weapon }
|
|
|
|
wep.name = "Lance"
|
|
|
|
wep.slice
|