public void SetClosestGrabbableItem(GrabbableItem item) { if (closest == item) { return; } if (closest != null) { closest.ResetItem(); } closest = item; }
private void EquipItem(GrabbableItem item) { if (equipped != null) { equipped.ResetItem(); equipped.Enable(); equipped.SetGravityScale(gameController.GetGravityDirection()); } closest = null; equipped = item; if (item == null) { return; } item.ResetItem(); item.Disable(); item.Equip(itemHolder); }