public override void SetValue(string value) { VariableSO parsedVal; if (VariableSO.TryParse(value, out parsedVal)) { try { SetValue((GameStateSMSO)parsedVal); } catch (Exception) { } } }
public void SetCurrentPlatform(PlatformBehavior currentPlatform) { if (prevPlatform == null || currentPlatform != prevPlatform) { PlayercurrentPlatform = currentPlatform; prevPlatform = PlayercurrentPlatform; NumSO = (VariableSO <int>)OnChangeValue.Value; NumSO.Value = PlayercurrentPlatform.maxNumberOfJumps; PlayercurrentPlatform.finished = true; } else { PlayercurrentPlatform = prevPlatform; } }
void Awake() { currentState = NodeState.Rotate; platformCurrentNumber = (VariableSO <int>)onCurrentNumberChange.Value; //platformCurrentNumber.Value = NodeRequiredNumber; }
private void Awake() { gemsNumber = (VariableSO <int>)onGemCollected.Value; }
protected override void VraiableField(Rect position, GUIContent label, VariableSO variableSO) { var varRefrence = (GameStateSMSO)variableSO; varRefrence.Value = (GameStateSM)EditorGUI.ObjectField(position, label, varRefrence.Value, typeof(GameStateSM), true); }