void Shoot() { transform.LookAt(target.GetTransform()); //Destroy(Instantiate(fxPrefab,fxPivot.position,fxPivot.rotation),0.5f); if (UnityEngine.Random.Range(0f, 1f) < accuracy) { target.GetIDamagable().Hit(damage); } else { Debug.Log("Miss"); } Reload(); }