using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// Toggles a variable's visibility based on a boolean or interger value (less than).
/// </summary>
public class VariableToggle : PropertyAttribute {
	
	public readonly string variableName;
	public readonly bool hideByBool = false;
	public readonly bool hideByInt = false;
	public readonly bool hideBool = false;
	public readonly int hideInt = 0;

	/// <summary>
	/// Turns off this variable's visibility if the the boolean variable matches the set boolean state.
	/// </summary>
	/// <param name="varName">Variable name.</param>
	/// <param name="state">If set to <c>true</c> state.</param>
	public VariableToggle (string varName, bool state) {
		this.variableName = varName;
		this.hideBool = state;
		this.hideByBool = true;
	}

	/// <summary>
	/// Turns off this variable's visibility if the the integer variable is less than the set integer value.
	/// </summary>
	/// <param name="varName">Variable name.</param>
	/// <param name="val">Value.</param>
	public VariableToggle (string varName, int val) {
		this.variableName = varName;
		this.hideInt = val;
		this.hideByInt = true;
	}
}
