示例#1
0
文件: Stick.cs 项目: siinomi/kurukuru
    // Update is called once per frame
    void Update()
    {
        // 入力を検出
        float xkey   = Input.GetAxisRaw("Horizontal");
        float ykey   = Input.GetAxisRaw("Vertical");
        float xtouch = _joystick.Position.x;
        float ytouch = _joystick.Position.y;

        //方向を決定
        direction = new Vector2(xkey + xtouch, ykey + ytouch).normalized;

        if (Input.GetKeyDown(KeyCode.K) == true)
        {
            uiscript.HPDealer(1);
            hp++;
        }
    }