Esempio n. 1
0
    void HandleNetworkInput()
    {
        if (Input.GetButtonDown("VoltUp"))
        {
            currentNode.SwitchNodeUp();
            playZapSound();
        }

        else if (Input.GetButtonDown("VoltDown"))
        {
            currentNode.SwitchNodeDown();
            playZapSound();
        }

        else if (Input.GetButtonDown("VoltLeft"))
        {
            currentNode.SwitchNodeLeft();
            playZapSound();
        }

        else if (Input.GetButtonDown("VoltRight"))
        {
            currentNode.SwitchNodeRight();
            playZapSound();
        }

        if (Input.GetButtonDown("VoltActivate"))
        {
            currentNode.ActivePower();
        }
    }