Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        UnitySingleTouchAction     touchAction = SceneShare.Instance.GetInput().GetSingleTouchAction();
        UnitySingleTouchDragAction dragAction  = SceneShare.Instance.GetInput().GetSingleTouchDragAction();

        touchAction.Update();
        dragAction.Update();

        //touchAction.PrintDifference();
        dragAction.PrintDifference();

        //if (dragAction.IsDragging()) {
        //    MhCommon.Print("dragging");
        //}
        //if (dragAction.IsDragBegan()) {
        //    MhCommon.Print("dragBegan");
        //}
        //if (touchAction.IsDragging()) {
        //MhCommon.Print("dragging");
        //Vector3 sp = touchAction.GetDragEndPosition();
        //Vector3 sp = touchAction.GetDragCurrentPosition();

        //MhCommon.Print("x = " + sp.x + " y = " + sp.y + " z = " + sp.z);

        //}
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        UnitySingleTouchAction touchAction = SceneShare.Instance.GetInput().GetSingleTouchAction();

        touchAction.Update();
        if (touchAction.IsTouchBegan())
        {
            MhCommon.Print("TitleScene -> MainMenuScene");
            UnityEngine.SceneManagement.SceneManager.LoadScene("MainMenuScene");
        }
        //UnityEngine.SceneManagement.SceneManager.LoadScene("DebugMenuScene");
    }
Ejemplo n.º 3
0
    // Update is called once per frame
    public override void Update()
    {
        UnitySingleTouchAction     touchAction = SceneShare.Instance.GetInput().GetSingleTouchAction();
        UnitySingleTouchDragAction dragAction  = SceneShare.Instance.GetInput().GetSingleTouchDragAction();

        touchAction.Update();
        dragAction.Update();

        // 移動処理
        Move();
        // 攻撃処理
        Attack();
    }