void PutObjectOnHand() { if (CurrentFloor.Pickable != null) { Sounds.PlaySound(ESoundType.PickUp); CurrentlyPickedUpObject = CurrentFloor.Pickable; currentItem.color = new Color(currentItem.color.r, currentItem.color.g, currentItem.color.b, 1.0f); currentItem.sprite = CurrentlyPickedUpObject.GetComponentInChildren <SpriteRenderer>().sprite; CurrentlyPickedUpObject.transform.localPosition = Vector3.forward * Z_BEHIND_BUILDING; CurrentFloor.Pickable = null; itemContainerAnimation.Play(); } }
void PutObjectOnHand() { if( CurrentFloor.Pickable != null ) { Sounds.PlaySound(ESoundType.PickUp); CurrentlyPickedUpObject = CurrentFloor.Pickable; currentItem.color = new Color( currentItem.color.r, currentItem.color.g, currentItem.color.b, 1.0f ); currentItem.sprite = CurrentlyPickedUpObject.GetComponentInChildren<SpriteRenderer>().sprite; CurrentlyPickedUpObject.transform.localPosition = Vector3.forward * Z_BEHIND_BUILDING; CurrentFloor.Pickable = null; itemContainerAnimation.Play(); } }