package com.ezardlabs.lostsector.missions.objectives;

import com.ezardlabs.dethsquare.Level;
import com.ezardlabs.dethsquare.LevelManager;
import com.ezardlabs.dethsquare.Vector2;
import com.ezardlabs.lostsector.Game.DamageType;
import com.ezardlabs.lostsector.levels.MissionLevel;
import com.ezardlabs.lostsector.missions.DefenseMission;
import com.ezardlabs.lostsector.objects.ShieldedEntity;

public class Cryopod extends ShieldedEntity {

	public Cryopod() {
		super(10, 40, 1500);
	}

	@Override
	public void start() {
		gameObject.renderer.setImage("data/objectives/cryopod/cryopod.png", 300, 100);
		gameObject.renderer.setOffsets(50, 100);
	}

	@Override
	protected void die(DamageType damageType, Vector2 attackOrigin) {
		Level level = LevelManager.getCurrentLevel();
		if (level instanceof MissionLevel) {
			MissionLevel missionLevel = (MissionLevel) level;
			if (missionLevel.getMission() instanceof DefenseMission) {
				((DefenseMission) missionLevel.getMission())
						.onCryopodDestroyed();
			}
		}
	}
}

@@ -266,77 +266,20 @@
 els.
-MissionLevel;%0Aimport com.ezardlabs.lostsector.missions.DefenseMission
+DefenseLevel
 ;%0Aim
@@ -742,173 +742,49 @@
 eof 
-MissionLevel) %7B%0A%09%09%09MissionLevel missionLevel = (MissionLevel) level;%0A%09%09%09if (missionLevel.getMission() instanceof DefenseMission) %7B%0A%09%09%09%09((DefenseMission) missionL
+DefenseLevel) %7B%0A%09%09%09((DefenseLevel) l
 evel
+)
 .get
@@ -796,16 +796,8 @@
 on()
-)%0A%09%09%09%09%09%09
 .onC
@@ -819,13 +819,8 @@
 ();%0A
-%09%09%09%7D%0A
 %09%09%7D%0A

Simplify death logic