Exemplo n.º 1
0
    private void startInteracting()
    {
        // interact!
        // continuously play the interaction animation, should be interruptable...

        IGridInteractable interactable = (IGridInteractable)GridManager.instance.getObjectAt(xPos);

        if (interactable == null)
        {
            return;
        }

        interacting = true;
        interactable.StartInteract();
        Debug.Log("INTERACT WITH ME");
    }
Exemplo n.º 2
0
    private void stopInteracting()
    {
        if (!interacting)
        {
            return;
        }

        interacting = false;

        IGridInteractable interactable = (IGridInteractable)GridManager.instance.getObjectAt(xPos);

        if (interactable == null)
        {
            return;
        }

        interactable.StopInteract();
    }