public void Remove(INode obj) { if (obj is GunNode) _playerGunNode = null; else if (obj is PlayerTargetNode) { var targetNode = obj as PlayerTargetNode; targetNode.healthComponent.isDead.subscribers -= OnTargetDead; } else if (obj is PlayerNode) { (obj as PlayerNode).healthComponent.isDead.subscribers -= OnPlayerDead; } }
private void OnPlayerDead(int ID) { _playerGunNode = null; }