Quantcast
Channel: Latest Questions by SatisfactorySam
Viewing all articles
Browse latest Browse all 42

Making an item class in Unity.

$
0
0
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.)

Viewing all articles
Browse latest Browse all 42

Trending Articles