public SequenceElementField(GameObject val) { type = SequenceDataType.Projectile; intValue = 0; // pointless af but no choice floatValue = 0f; // pointless af but no choice projectileValue = null; // pointless af but no choice gameObjectValue = val; json = null; unityObject = null; }
public void ConvertTo(SequenceDataType nType) { switch (type) { case SequenceDataType.Floating: switch (nType) { case SequenceDataType.Floating: // Nothing to do break; case SequenceDataType.Integer: intValue = (int)floatValue; break; default: // Can't convert break; } break; case SequenceDataType.Integer: switch (nType) { case SequenceDataType.Floating: floatValue = intValue; break; case SequenceDataType.Integer: // Nothing to do break; default: // Can't convert break; } break; default: // Can't convert break; } type = nType; }