// Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.DownArrow) ||
            Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.RightArrow))
        {
            if (managerScript.Get_friendSprOn() == false)
            {
                gameClassMoveFunction();
            }

            //else if()
            //{

            //}
        }
    }
Exemplo n.º 2
0
    public void HitNotify()
    {
        // Do something when user hits correct input

        TwoDGameManScr.IncreaseScore(arrowTag);
        callSprScr.setPlayerSpritePose(arrowDirection, arrowTag);
        if (arrowTag == ARROW_TYPE.CLASS)
        {
            if (TwoDGameManScr.Get_friendSprOn() == false)
            {
                TwoDGameManScr.PlayWrongSound();
            }
        }
        else if (arrowTag == ARROW_TYPE.FRIEND)
        {
            TwoDGameManScr.PlayCorrectSound();
        }
    }