InputManager.getInstance C# (CSharp) Method

getInstance() public static method

public static getInstance ( ) : InputManager
return InputManager
    public static InputManager getInstance()
    {
        if (!_instance)
        {
            GameObject newInstance;
            newInstance = new GameObject("InputManager");
            _instance = newInstance.AddComponent<InputManager>();
        }

        return _instance;
    }

Usage Example

Ejemplo n.º 1
0
 /// <summary>
 /// Checks if the textbox has gained focus
 /// </summary>
 protected virtual void checkFocus()
 {
     if (InputManager.getInstance().wasLeftButtonPressed())
     {
         this.HasFocus = isActorOver(InputManager.getInstance().MousePosition);
     }
 }
All Usage Examples Of InputManager::getInstance