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.DefenseLevel;
import com.ezardlabs.lostsector.objects.ShieldedEntity;

public class Cryopod extends ShieldedEntity {
	private int id;

	public Cryopod() {
		super(100, 200, 1000);
	}

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

	public void setId(int id) {
		this.id = id;
	}

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

@@ -48,16 +48,56 @@
 tives;%0A%0A
+import com.ezardlabs.dethsquare.Layers;%0A
 import c
@@ -640,24 +640,77 @@
 s(50, 100);%0A
+%09%09gameObject.setLayer(Layers.getLayer(%22Objective%22));%0A
 %09%7D%0A%0A%09public 

Set cryopod layer to "Objective"