This commit is contained in:
2026-06-09 09:18:17 +07:00
parent 3578a2750c
commit 71a096556a
5777 changed files with 6675 additions and 13 deletions

View File

@@ -1,43 +0,0 @@
/// ---------------------------------------------
/// Ultimate Character Controller
/// Copyright (c) Opsive. All Rights Reserved.
/// https://www.opsive.com
/// ---------------------------------------------
namespace Opsive.UltimateCharacterController.Input.VirtualControls
{
using UnityEngine;
/// <summary>
/// An abstract class which represents a virtual control on the screen.
/// </summary>
public abstract class VirtualControl : MonoBehaviour
{
protected VirtualControlsManager m_VirtualControlsManager;
/// <summary>
/// Initialize the default values.
/// </summary>
protected virtual void Awake()
{
m_VirtualControlsManager = GetComponentInParent<VirtualControlsManager>();
if (m_VirtualControlsManager == null) {
Debug.LogError("Error: Unable to find the VirtualControlsManager. This component must be a parent to the virtual input monitors.");
}
}
/// <summary>
/// Returns if the button is true with the specified ButtonAction.
/// </summary>
/// <param name="action">The type of action to check.</param>
/// <returns>The status of the action.</returns>
public virtual bool GetButton(InputBase.ButtonAction action) { return false; }
/// <summary>
/// Returns the value of the axis.
/// </summary>
/// <param name="name">The name of the axis.</param>
/// <returns>The value of the axis.</returns>
public virtual float GetAxis(string name) { return 0; }
}
}