// ----------------------------------
// RSDK Project: Sonic 2
// Script Description: Ring Sparkle Object
// Script Author: Christian Whitehead/Simon Thomley
// Unpacked by Rubberduckycooly's script unpacker
// ----------------------------------

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

private alias object.value0 : object.timer

event ObjectUpdate

	object.timer++
	if object.timer == 6
		object.timer = 0
		object.frame++

		if object.frame == 4
			object.type = TypeName[Blank Object]
			object.frame = 0
		end if
	end if

end event


event ObjectDraw
	DrawSprite(object.frame)
end event


event ObjectStartup
	LoadSpriteSheet("Global/Items.gif")

	// Sparkle frames
	SpriteFrame(-8, -8, 16, 16, 1, 219)
	SpriteFrame(-8, -8, 16, 16, 1, 236)
	SpriteFrame(-8, -8, 16, 16, 18, 236)
	SpriteFrame(-8, -8, 16, 16, 35, 236)

end event


event RSDKDraw
	DrawSprite(0)
end event


event RSDKLoad
	LoadSpriteSheet("Global/Items.gif")
	SpriteFrame(-8, -8, 16, 16, 1, 219)
	
	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end event
