private void RemoveSoul(ZMPedestalController pedestalController) { ZMSoul soul = pedestalController.GetComponent <ZMSoul>(); if (soul != null) { soul.SendMessage("SetPulsingOff", SendMessageOptions.DontRequireReceiver); RemoveSoul(soul); } }
void OnTriggerStay2D(Collider2D collision) { if (collision.gameObject.CompareTag(kPedestalTag)) { ZMSoul soul = collision.GetComponent <ZMSoul>(); ZMPedestalController pedestalController = collision.GetComponent <ZMPedestalController>(); if (_playerInfo != soul.PlayerInfo) { if (pedestalController.IsEnabled() && _targetState == TargetState.ALIVE) { AddSoul(soul); } else if (!pedestalController.IsEnabled()) { RemoveSoul(soul); } } } }