I am working on a tutorial series and recoding everything in Javascript from C#. I am only doing this as the tutorial is perfect for me but not in Javascript. I know enough C# to read some of the lines of code, but not enough to write it from scratch. This particular part makes objects “Living Entities” and allows them to take damage if hit by a projectile.
I have a script called IDamageable.js and so far it only contains the following:
function TakeHit(damage:float,hit:RaycastHit){
}
In C# a script called LivingEntity.cs uses the following lines to somehow connect the IDamageable part:
public class LivingEntity : MonoBehaviour, IDamageable {
}
I am unsure of what the comma does. Like the IDamageable part in that line. So I am unable to ask the question directly of how to implement an [Extend? Value? Whatever?] in Javascript. So my question is, what is the IDamageable parameter called… and how do I do the same thing in Javascript. My apologies in advance, I think my question could be a lot more straight forward if I knew the terminology of the position IDamageable occupies in the C# code.