package com.ezardlabs.lostsector.objects.weapons.primary;

import com.ezardlabs.dethsquare.Input;
import com.ezardlabs.dethsquare.Input.KeyCode;
import com.ezardlabs.dethsquare.animation.AnimationType;
import com.ezardlabs.lostsector.objects.weapons.PrimaryWeapon;

public class Gorgon extends PrimaryWeapon {

	public Gorgon() {
		super("Gorgon");
	}

	@Override
	protected String getDataPath() {
		return "data/weapons/primary/gorgon";
	}

	@Override
	public AnimationType getAnimationType() {
		return new AnimationType() {
			private boolean holstering = false;

			@Override
			public int update(int currentFrame, int numFrames) {
				switch (currentFrame) {
					case 0:
					case 1:
						holstering = !Input.getKey(KeyCode.MOUSE_RIGHT);
						if (holstering) {
							return currentFrame - 1;
						} else {
							return currentFrame + 1;
						}
					case 2:
					case 3:
					case 4:
					case 5:
						return currentFrame + 1;
					case 6:
						if (Input.getKey(KeyCode.MOUSE_RIGHT)) {
							return 2;
						} else {
							holstering = true;
							return 1;
						}
					default:
						return -1;
				}
			}
		};
	}
}

@@ -52,16 +52,102 @@
 imary;%0A%0A
+import com.ezardlabs.dethsquare.Collider;%0Aimport com.ezardlabs.dethsquare.GameObject;%0A
 import c
@@ -281,16 +281,126 @@
 onType;%0A
+import com.ezardlabs.dethsquare.graphics.Renderer;%0Aimport com.ezardlabs.lostsector.objects.projectiles.Laser;%0A
 import c
@@ -1058,16 +1058,329 @@
 case 2:%0A
+%09%09%09%09%09%09GameObject.instantiate(%0A%09%09%09%09%09%09%09%09new GameObject(%22Gorgon Bullet%22, new Renderer(%22images/laser_yellow.png%22, 100, 100),%0A%09%09%09%09%09%09%09%09%09%09new Collider(100, 100, true), new Laser(1, %22enemy%22)),%0A%09%09%09%09%09%09%09%09transform.position.offset(transform.scale.x %3E 0 ? 225f : -100,%0A%09%09%09%09%09%09%09%09%09%0962.5f)).transform.scale.x = transform.scale.x;%0A
 %09%09%09%09%09cas

Add bullets to Gorgon