void ToggleScope() { Camera.main.fieldOfView = (Camera.main.fieldOfView == 60) ? 60/scopeZoom : 60; }
void Start() { currentAmmo = magazineSize; } Mods Ravenfield Build 26
private float nextFireTime = 0f; private int currentAmmo; void ToggleScope() { Camera
if (Input.GetButtonDown("Fire2")) { ToggleScope(); } } } private float nextFireTime = 0f
void PerformRaycast() { Ray ray = Camera.main.ScreenPointToRay(new Vector3(Screen.width/2, Screen.height/2, 0)); RaycastHit hit; if (Physics.Raycast(ray, out hit, range)) { BotHealth bot = hit.collider.GetComponent<BotHealth>(); if (bot != null) bot.TakeDamage(damage); } }
void Fire() { currentAmmo--; PlayFireSound(); PerformRaycast(); }