void Update()
    {
        GameObject   look  = GameObject.FindGameObjectWithTag("Player");
        GameObject   look2 = GameObject.Find("Mouse");
        bl_MouseLook sensx = look.GetComponent <bl_MouseLook> ();
        bl_MouseLook sensy = look2.GetComponent <bl_MouseLook> ();


        if (m_gun.isAmed && aimbool)
        {
//			sensx.sX /= 3;
//			sensx.sY /= 3;
//			sensy.sX /= 3;
//			sensy.sY /= 3;
            PlayerPrefs.SetFloat("sensitive", sensx.sX / 2);
            aimbool = false;
        }
        else if (!m_gun.isAmed && !aimbool)
        {
//			sensx.sX *= 3;
//			sensx.sY *= 3;
//			sensy.sX *= 3;
//			sensy.sY *= 3;
            PlayerPrefs.SetFloat("sensitive", sensx.sX * 2);
            aimbool = true;
        }
    }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 void Awake()
 {
     m_mouse          = transform.root.GetComponentInChildren <bl_MouseLook>();
     GunBob           = transform.root.GetComponentInChildren <bl_GunBob>();
     Sync             = GameObject.FindWithTag("WeaponManager").GetComponent <bl_SyncWeapon>();
     DefaultSpreat    = baseSpread;
     DefaultMaxSpread = maxSpread;
 }
Beispiel #3
0
 void Awake()
 {
     m_mouse          = transform.root.GetComponentInChildren <bl_MouseLook>();
     GunBob           = transform.root.GetComponentInChildren <bl_GunBob>();
     SwayGun          = this.transform.root.GetComponentInChildren <bl_DelaySmooth>();
     Sync             = GameObject.FindWithTag("WeaponManager").GetComponent <bl_SyncWeapon>();
     Cross            = bl_UtilityHelper.GetGameManager.gameObject.GetComponent <bl_Crosshair>();
     DefaultSpreat    = baseSpread;
     DefaultMaxSpread = maxSpread;
 }
Beispiel #4
0
 void Awake()
 {
     m_mouse = transform.root.GetComponentInChildren<bl_MouseLook>();
     GunBob = transform.root.GetComponentInChildren<bl_GunBob>();
     SwayGun = this.transform.root.GetComponentInChildren<bl_DelaySmooth>();
     Sync = GameObject.FindWithTag("WeaponManager").GetComponent<bl_SyncWeapon>();
     Cross = bl_UtilityHelper.GetGameManager.gameObject.GetComponent<bl_Crosshair>();
     DefaultSpreat = baseSpread;
     DefaultMaxSpread = maxSpread;
 }
Beispiel #5
0
 void Start()
 {
     CharController = this.GetComponent <CharacterController>();
     MouseLookChild = this.GetComponentInChildren <bl_MouseLook>();
     Anim           = GetComponentInChildren <Animator>();
 }