private void OnNewFloor() { if (storedPlayer) { PlayerResponsibleForDisplacement displacing = storedPlayer.gameObject.GetOrAddComponent <PlayerResponsibleForDisplacement>(); } }
protected override void OnPickedUpByPlayer(PlayerController player) { if (!everPickedUpByPlayer) { listOfDisplacedEnemies.DisplacedEnemies.Clear(); GameManager.Instance.OnNewLevelFullyLoaded += this.OnNewFloor; PlayerResponsibleForDisplacement displacing = player.gameObject.GetOrAddComponent <PlayerResponsibleForDisplacement>(); } storedPlayer = player; base.OnPickedUpByPlayer(player); }