"use strict";

// chocolate, vanilla, strawberry.
// or perhaps coffee, lemon, peppermint.
// maybe maple, ginger, cotton candy?
// caramel, cola, bubblegum?
// Realistically, it probably just tastes like whatever ice cream you most want to taste when you eat it.
// It IS the reward for glomping the GLorious Floof, after all.
var GO_IceCream = function(){
	this.sprite = new Sprite(GO_IceCream.spriteSheet,"IceCream");
	this.sprite.collision_flags = 
		DEFINE_SPRITE_COLLISION_FLAGS.SPRITES_PASSIVE;
	this.sprite.setBoundingBox(3,0,12,15);
	this.sprite.game_object = this; // no longer a generic GO

	this.sprite.frame = 0;
	this.frame_timer = 0;
	this.filled = false;
};
GO_IceCream.spriteImg = SDS_Load_Image("art/sheets/sprite/icecream.png");
GO_IceCream.spriteSheet = new TileSheet(4, 4, 2, 1, GO_IceCream.spriteImg);

GO_IceCream.prototype = new GameObject(
	new Sprite(
		GO_IceCream.spriteSheet,
		"IceCream"
	),
	"IceCream"
	);

	GO_IceCream.prototype.interactions = DEFINE_GAMEOBJECT_INTERACTIONS.CHECK;

	GO_IceCream.prototype.Update = function(){
		if (this.filled){
			if ((this.sprite.frame<7) && (this.frame_timer^=1)) ++this.sprite.frame;
		}
	};

	GO_IceCream.prototype.checkEvent = function(sourceGO){
		return this.filled ? "Get_IceCream" : "GD_No_IceCream"; // filed under ULTIMATE CLIMACTIC BATTLE TO THE DEATH BETWEEN RIVAL GOD-ENTITIES ... that is, grey.
	};
