public void SerializeSingleVarConditionTest() { var serializedVarCondition = JsonUtility.ToJson(varCondition); Debug.Log(serializedVarCondition); var restoredVarCondition = JsonUtility.FromJson <VarCondition>(serializedVarCondition); Assert.NotNull(restoredVarCondition); Assert.AreEqual(varCondition.GetType(), restoredVarCondition.GetType()); Assert.AreEqual(varCondition.getType(), restoredVarCondition.getType()); Assert.AreEqual(varCondition.getState(), restoredVarCondition.getState()); Assert.AreEqual(varCondition.getValue(), restoredVarCondition.getValue()); }
public bool manages(Condition c) { return(c.GetType() == condition.GetType()); }