using FOHEART.GlovePlugin;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BulletNeverHitMeLogic : FOGestureActionAdatper
{

    public override void onLeftHandGesture(Gesture currentGesture, GameObject leftHandTouchObject, GameObject gameObject)
    {
        // 
        if (currentGesture == Gesture.FIRE)
        {
            if (gameObject != this.gameObject)
            {
                return;
            }

            bool forX = (Random.Range(0, 99) % 2) == 0;
            int x1 = (Random.Range(0, 99) % 2) == 0 ? -1 : 1;
            float x2 = Random.Range(0.5f, 1f);

            // pivotģʽxƶӵ
            transform.Translate(forX ? x1 * x2 : 0, 0.1f, forX ? 0 : x1 * x2, Space.Self);
        }
    }
}
