コード例 #1
0
    private void Update()
    {
        playerMovement movement = (GetComponent <playerMovement>() as playerMovement);

        if (word == keywords[0])
        {
            movement.GoLeft();
        }
        else if (word == keywords[1])
        {
            movement.GoRight();
        }
        else if (word == keywords[2])
        {
            movement.GoUp();
        }
        else if (word == keywords[3])
        {
            movement.GoDown();
        }
        else if (word == keywords[4])
        {
            movement.Stop();
        }
        else if (word == keywords[5])
        {
            movement.Revert();
        }
    }