protected void StopMovePickUp(OnPickUp e) { StopAllCoroutines(); moveHold = false; SetAnimation(false); Reoriente(); }
private void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Player")) { if (collided) { return; } collided = true; col.enabled = false; anim.SetTrigger("pickUp"); source.Play(); switch (itemType) { case ItemType.Gem: OnPickUp?.Invoke(1); break; case ItemType.Cherry: OnPickUp?.Invoke(2); break; } Destroy(gameObject, 0.267f); } }
public void PickUp(Rigidbody2D rigidbody) { OnPickUp.Invoke(); pickUpAnimator.SetTrigger("PickUp"); AddForceBoost(rigidbody); freezeManager.Freeze(freezeTime); StartCoroutine(Respawn()); }
private void OnMouseDown() { _dragging = true; transform.localScale = Vector3.one * _sizeCoefficient; _material.SetFloat("_Highlight", 1f); _collider.enabled = false; OnPickUp?.Invoke(); Chest.Instance.Open(); }
void ObjectPickUp(OnPickUp pEvent) { PlayEmitter(SFX_OBJ_PICKUP_STRING); }
private void NotifyOnPickUp() { OnPickUp?.Invoke(this); }
public void PickUp() { Def.PickUp(); OnPickUp?.Invoke(this, this); }
public virtual void PickUp() { PickedUp = true; OnPickUp?.Invoke(this); }
public bool PickUp(IItem item) { inventory.Add(item); OnPickUp?.Invoke(item); return(true); }
public void Interact() { gameObject.SetActive(false); OnPickUp?.Invoke(this); }
public void PickUp() { OnPickUp?.Invoke(); }
/// <summary> /// set pickup obj /// </summary> /// <param name="bePickedRoot"></param> /// <param name="call"></param> public void SetPickupInfo(GameObject bePickedRoot, OnPickUp call) { _callback = call; _pickupObj = bePickedRoot; _allRenderers = bePickedRoot.GetComponentsInChildren <Renderer>(); }
private void HandlePickedUp() { IsCollected = true; animator.PlayCollected(); OnPickUp?.Invoke(this); }