private void onPlayerExit(PlayerDetectorBehaviour detector, PlayerInteractBehaviour player) { if (player.currentCollectble == this) { player.currentCollectble = null; } }
private void onPlayerExit(PlayerDetectorBehaviour detector, PlayerInteractBehaviour player) { if (player.currentReceiver == this) { player.currentReceiver = null; } }
private void OnPlayerEnter(PlayerDetectorBehaviour detec, PlayerInteractBehaviour player) { if (m_active) { m_controller.OnDie(); } }
private void onPlayerEnter(PlayerDetectorBehaviour detector, PlayerInteractBehaviour player) { if (!m_isPlugged && (player.currentCollectble == null || !player.currentCollectble.IsBeingHeld)) { player.currentCollectble = this; } }
public void OnDrop(PlayerInteractBehaviour player) { transform.SetParent(null); rigidbody.bodyType = RigidbodyType2D.Dynamic; player.OnDropItem(); m_isBeingHeld = false; }
public void Drop() { if (m_currentPlayer != null) { OnDrop(m_currentPlayer); } m_currentPlayer = null; }
public CollectbleInfo OnCollect(PlayerInteractBehaviour player) { transform.SetParent(player.transform); transform.localPosition = m_collectbleInfo.localPosition; rigidbody.bodyType = RigidbodyType2D.Kinematic; rigidbody.velocity = Vector2.zero; rigidbody.angularVelocity = 0f; m_currentPlayer = player; m_isBeingHeld = true; return(CollectbleInfo); }
public void RemoveCollectble(PlayerInteractBehaviour player) { if (currentCollectble == null) { return; } AudioController.Instance.Play(plugAudio, AudioController.SoundType.SoundEffect2D); currentCollectble.OnRemovedFromReceiver(); player.CollectItem(currentCollectble); currentCollectble = null; renderer.sprite = inactiveSprite; animator.SetTrigger(CHANGE_CAP); SetDependentObjectsActive(false); }
private void OnTriggerEnter2D(Collider2D collision) { PlayerInteractBehaviour player = collision.GetComponent <PlayerInteractBehaviour>(); if (player != null) { if (callback_OnPlayerEnter != null) { foreach (var item in callback_OnPlayerEnter.GetInvocationList()) { item.DynamicInvoke(this, player); } } } }
private void onPlayerEnter(PlayerDetectorBehaviour detector, PlayerInteractBehaviour player) { player.currentReceiver = this; }
private void OnPlayerEnter(PlayerDetectorBehaviour det, PlayerInteractBehaviour player) { endScreen.SetActive(true); player.CanMove = false; }