void OnTriggerStay(Collider other) { if (gameObject.layer == LayerMask.NameToLayer("Item")) { if (Input.GetButtonDown("EquipLeft") || Input.GetButtonDown("EquipRight")) { transform.localRotation = Quaternion.Euler(0, 0, 0); BodySockets oBS = other.GetComponent <BodySockets> (); oBS.DetachTransport(false); oBS.AttachTransport(GetComponent <TransportNode>()); } } }
void Die() { bs.CeaseFirePrimary(); if (Random.value <= dropRate) { int rand = Random.Range(0, bs.primaryWeaponSockets.Length + 1); if (rand == bs.primaryWeaponSockets.Length) { bs.DetachTransport(false); } else { bs.DetachPrimaryWeapon(rand, false); } } }