void Awake() { if (!Instance) { Instance = this; } else { Debug.Log("Already in the Scene !"); Destroy(this); } }
void OnDestroy() { #region Events #region Axis #region LeftStick OnVerticalAxisInput = null; OnHorizontalAxisInput = null; OnMoveAxisInput = null; #endregion #region RightStick OnRotateXAxisInput = null; OnRotateYAxisInput = null; OnRotateAxisInput = null; #endregion #region D-pad OnDpadxAxis = null; OnDpadyAxis = null; OnDpadxButton = null; OnDpadyButton = null; #endregion #region Trigger OnRightTriggerAxis = null; OnLeftTriggerAxis = null; #endregion #endregion #region Buttons #region A #region GetKey OnAInputPress = null; #endregion #region GetKeyDown OnADownInputPress = null; #endregion #region GetKeyUp OnAUpInputPress = null; #endregion #endregion #region B #region GetKey OnBInputPress = null; #endregion #region GetKeyDown OnBDownInputPress = null; #endregion #region GetKeyUp OnBUpInputPress = null; #endregion #endregion #region X #region GetKey OnXInputPress = null; #endregion #region GetKeyDown OnXDownInputPress = null; #endregion #region GetKeyUp OnXUpInputPress = null; #endregion #endregion #region Y #region GetKey OnYInputPress = null; #endregion #region GetKeyDown OnYDownInputPress = null; #endregion #region GetKeyUp OnYUpInputPress = null; #endregion #endregion #region Start #region GetKey OnStartInputPress = null; #endregion #region GetKeyDown OnStartDownInputPress = null; #endregion #region GetKeyUp OnStartUpInputPress = null; #endregion #endregion #region Back #region GetKey OnBackInputPress = null; #endregion #region GetKeyDown OnBackDownInputPress = null; #endregion #region GetKeyUp OnBackUpInputPress = null; #endregion #endregion #region Bumper #region GetKeyDown //RightBumperDown OnRightBumperDownInputPress = null; //LeftBumperDown OnLeftBumperDownInputPress = null; #endregion #region GetKeyUp //RightBumperUp OnRightBumperUpInputPress = null; //LeftBumperUp OnLeftBumperUpInputPress = null; #endregion #region GetKey //RightBumper OnRightBumperInputPress = null; //LeftBumper OnLeftBumperInputPress = null; #endregion #endregion #region LeftStickClick #region GetKey OnLeftStickClickInputPress = null; #endregion #region GetKeyDown OnLeftStickClickDownInputPress = null; #endregion #region GetKeyUp OnLeftStickClickUpInputPress = null; #endregion #endregion #region RightStickClick #region GetKey OnRightStickClickInputPress = null; #endregion #region GetKeyDown OnRightStickClickDownInputPress = null; #endregion #region GetKeyUp OnRightStickClickUpInputPress = null; #endregion #endregion #endregion #endregion Instance = null; }