private void DoPickupAnimation() { pickupAnimation = playerInstance.GetComponentInChildren <PickupAnimation>(); sprite = GetComponentInChildren <SpriteRenderer>().sprite; pickupAnimation.DoAnimation(sprite, proportion); }
private void Start() { playerInstance = PlayerInstant.Instance; pickupAnimation = playerInstance.GetComponentInChildren <PickupAnimation>(); gameObject.name = item.ToString(); proportion = GetComponentInChildren <SpriteRenderer>().transform.localScale.x; }