// Start is called before the first frame update void Start() { mainCamera = Camera.main; Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; rayCastWeapon = GetComponentInChildren <RayCastWeapon>(); }
// Start is called before the first frame update void Start() { maincamera = Camera.main; Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; weapon = GetComponentInChildren <RayCastWeapon>(); anim = GetComponent <Animator>(); audsource = GetComponent <AudioSource>(); }
void Start() { missile = GetComponent <ProjectileWeapon>(); shotgun = GetComponent <RayCastWeapon>(); shotgun.enabled = true; missile.enabled = false; shotgunImage.enabled = true; missileImage.enabled = false; }
public void OnRaycastHit(RayCastWeapon weapon, Vector3 direction) { health.TakeDamage(weapon.damage, direction); }
private void Awake() { rayCastWeapon = GetComponent <RayCastWeapon>(); }