enum ModTypes {
DoT,Blindness
}
class Modifier {
var type = ModTypes.DoT;
var magnitude : float;
var duration : float;
var timer : float = 0.0;
var activateTimer = 0.0;
var activateInterlapse;
}
public var modifiers = new ArrayList();
function ProcessModifiers()
{
for (mod in modifiers)
{
mod.timer += Time.deltaTime;
if (mod.type == ModTypes.DoT) {
...
On that last line I receive a: "Assets/Scripts/Networking/PlayerScript.js(139,30): BCE0051: Operator '==' cannot be used with a left hand side of type 'System.Object' and a right hand side of type 'ModTypes'." Even though it is obviously the correct type?