using UnityEngine;
namespace CarbonInput {
///
/// Used to store global settings for CarbonInput.
///
[CreateAssetMenu(fileName = "CarbonInput", menuName = "Carbon Input/Settings", order = 100)]
public class CarbonSettings : ScriptableObject {
///
/// Defines the behaviour of PlayerIndex.Any
///
[Tooltip("Defines the behaviour of PlayerIndex.Any")]
public AnyBehaviour Behaviour = AnyBehaviour.CheckAll;
///
/// Defines if any must be inverted.
///
[SerializeField]
// ReSharper disable once InconsistentNaming
private bool[] InvertedAxis = new bool[CarbonController.AxisCount];
///
/// Gets or sets the given axis to be inverted or not.
///
///
///
public bool this[CAxis axis] {
get { return InvertedAxis[(int)axis]; }
set { InvertedAxis[(int)axis] = value; }
}
///
/// Will try to load the CarbonInput asset. If the asset is not found, it wil return a new CarbonSettings object.
///
///
public static CarbonSettings Default() {
CarbonSettings settings = Resources.Load("CarbonInput");
if(settings != null) return settings;
return CreateInstance();
}
}
}