|
|
@ -234,7 +234,7 @@ namespace Fungus |
|
|
|
if (Value != null) |
|
|
|
if (Value != null) |
|
|
|
return Value.ToString(); |
|
|
|
return Value.ToString(); |
|
|
|
else |
|
|
|
else |
|
|
|
return string.Empty; |
|
|
|
return "Null"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected virtual void Start() |
|
|
|
protected virtual void Start() |
|
|
@ -246,7 +246,7 @@ namespace Fungus |
|
|
|
//Apply to get from base system.object to T |
|
|
|
//Apply to get from base system.object to T |
|
|
|
public override void Apply(SetOperator op, object value) |
|
|
|
public override void Apply(SetOperator op, object value) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(value is T) |
|
|
|
if(value is T || value == null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Apply(op, (T)value); |
|
|
|
Apply(op, (T)value); |
|
|
|
} |
|
|
|
} |
|
|
@ -277,7 +277,7 @@ namespace Fungus |
|
|
|
//Apply to get from base system.object to T |
|
|
|
//Apply to get from base system.object to T |
|
|
|
public override bool Evaluate(CompareOperator op, object value) |
|
|
|
public override bool Evaluate(CompareOperator op, object value) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (value is T) |
|
|
|
if (value is T || value == null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return Evaluate(op, (T)value); |
|
|
|
return Evaluate(op, (T)value); |
|
|
|
} |
|
|
|
} |
|
|
@ -301,10 +301,10 @@ namespace Fungus |
|
|
|
switch (compareOperator) |
|
|
|
switch (compareOperator) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case CompareOperator.Equals: |
|
|
|
case CompareOperator.Equals: |
|
|
|
condition = Value.Equals(value); |
|
|
|
condition = Equals(Value, value);// Value.Equals(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case CompareOperator.NotEquals: |
|
|
|
case CompareOperator.NotEquals: |
|
|
|
condition = !Value.Equals(value); |
|
|
|
condition = !Equals(Value, value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
Debug.LogError("The " + compareOperator.ToString() + " comparison operator is not valid."); |
|
|
|
Debug.LogError("The " + compareOperator.ToString() + " comparison operator is not valid."); |
|
|
|