"use strict";

var GO_WaterSwitch = function(pushEvt){
	this.sprite = new Sprite(GO_WaterSwitch.spriteSheet,"WaterSwitch");
	this.sprite.collision_flags = 
		DEFINE_SPRITE_COLLISION_FLAGS.SPRITES_PASSIVE;
	this.sprite.setBoundingBox(7,3,24,15);
	this.sprite.game_object = this; // no longer a generic GO

	this.name = "WaterSwitch";

	this._makeCheckable(pushEvt);
	this.pressed=false;
};
GO_WaterSwitch.spriteImg = SDS_Load_Image("art/sheets/sprite/waterswitch.png");
GO_WaterSwitch.spriteSheet = new TileSheet(5, 4, 0, 1, GO_WaterSwitch.spriteImg);

GO_WaterSwitch.prototype = new GameObject(
	new Sprite(
		GO_WaterSwitch.spriteSheet,
		"WaterSwitch"
	),
	"WaterSwitch"
	);

	GO_WaterSwitch.prototype.Update = function(){
		this.sprite.frame = this.pressed ? 1 : 0;
		//if (this.pressed){
		//	this.interactions |= (checkevent ? DEFINE_GAMEOBJECT_INTERACTIONS.CHECK : 0);
		//}
		//else{
		//	this.interactions &= ~DEFINE_GAMEOBJECT_INTERACTIONS.CHECK;
		//}
	};
