// ----------------------------------
// RSDK Project: Sonic 1
// Script Description: Water Splash Object
// Script Author: Christian Whitehead/Simon Thomley
// Unpacked by Rubberduckycooly's script unpacker
// ----------------------------------

// ========================
// Aliases
// ========================

private alias object.value0 : object.timer


// ========================
// Events
// ========================

event ObjectUpdate
	// Hover above the water surface
	object.iypos = stage.waterLevel
	
	object.timer++
	if object.timer > 5
		object.timer = 0
		object.frame++
		if object.frame > 2
			object.type = TypeName[Blank Object]
		end if
	end if
end event


event ObjectDraw
	DrawSprite(object.frame)
end event


event ObjectStartup
	LoadSpriteSheet("LZ/Objects.gif")
	
	SpriteFrame(-10, -12, 20, 12, 202, 76)
	SpriteFrame(-15, -30, 30, 30, 159, 59)
	SpriteFrame(-16, -32, 32, 32, 190, 43)
end event


// ========================
// Editor Events
// ========================

event RSDKDraw
	DrawSprite(0)
end event


event RSDKLoad
	LoadSpriteSheet("LZ/Objects.gif")
	SpriteFrame(-10, -12, 20, 12, 202, 76)
	
	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end event
