I'm best with javascript and I've learned to write classes something like this:
function Item(name, description) {
this.name = name;
this.description = description;
this.use = function use() {
//Do something
}
}
:P I believe this is incorrect in Unity, as it doesn't work. How can I do something like this? I aim to do everything I've shown above. (Item class, properties for items, and attaching a function.)
↧