BUBBLE_PROX_N = 100.0 ;

function wait( seconds )
	local count = 0.0 ;
	while ( count < seconds ) do
		--DEBUG_OUTPUT( "Count: " .. count ) ;
		coroutine.yield( ) ;
		count = count + getDeltaT( ) ;
	end
end

function printiv( i, v )
	if ( ( type( v ) == "number" )
		or ( type( v ) == "string" ) ) then
		DEBUG_OUTPUT( i .. "=" .. v ) ;
	elseif ( type( v ) == "boolean" ) then
		-- can't concatenate boolean - so do it seperate
		local displayValue = "false" ;
		if ( v ) then
			displayValue = "true" ;
		end
		DEBUG_OUTPUT( i .. "=" .. displayValue ) ;
	end
end

function printAllGlobals( )
	DEBUG_OUTPUT( "\n---Globals Start---" ) ;
	table.foreach( _G, printiv ) ;
	DEBUG_OUTPUT( "---Globals End---\n" ) ;
end

function controlToString( controlString )
	if ( controlString == "mouse" ) then
		return getString( "mousecontrol" ) ;
	elseif ( controlString == "arrows" ) then
		return getString( "arrowcontrol" ) ;
	elseif ( controlString == "asdf" ) then
		return getString( "asdfcontrol" ) ;
	else
		return "other" ;
	end
end

function howToMoveTip( )
	setTipTitle( getString( "howtomovetitle" ) ) ;
	if ( getNumPlayers( ) == 1 ) then
		setTipText( getString( "howtomovetip" ) ) ;
		setTipImage( "mousearrows" ) ;
	else
		setTipText( getString( "howtomovemultitip", controlToString( get2PlayerControl( 0 ) ), controlToString( get2PlayerControl( 1 ) ) ) ) ;
	end
	--setTipImage( "goo1" ) ;
	activateTipWindow( ) ;
end

function replicantTip( )
	setTipTitle( getString( "replicantleveltitle" ) ) ;
	setTipText( getString( "replicantleveltip" ) ) ;
	activateTipWindow( ) ;
end

function labTip( )
	setTipTitle( getString( "lableveltitle" ) ) ;
	setTipText( getString( "lableveltip" ) ) ;
	setTipImage( "timemachinetip" ) ;
	activateTipWindow( ) ;
end

function helperArrowTip( )
	setTipTitle( getString( "helperarrowtiptitle" ) ) ;
	setTipText( getString( "helperarrowtip" ) ) ;
	setTipImage( "helperarrowtip" ) ;
	activateTipWindow( ) ;
end

function largerHurtTip( )
	if ( not isLevelDeadly( ) ) then
		setTipTitle( getString( "largerhurttiptitle" ) ) ;
		setTipText( getString( "largerhurttip" ) ) ;
		setTipImage( "largerentity" ) ;
		activateTipWindow( ) ;
	end
end

function ratEatTip( )
	setTipTitle( getString( "rateattiptitle" ) ) ;
	setTipText( getString( "rateattip" ) ) ;
	activateTipWindow( ) ;
end

function catEatTip( )
	setTipTitle( getString( "cateattiptitle" ) ) ;
	setTipText( getString( "cateattip" ) ) ;
	activateTipWindow( ) ;
end

function eggs1Tip( )
	setTipTitle( getString( "eggs1tiptitle" ) ) ;
	setTipText( getString( "eggs1tip" ) ) ;
	activateTipWindow( ) ;
end

function eggs2Tip( )
	setTipTitle( getString( "eggs2tiptitle" ) ) ;
	setTipText( getString( "eggs2tip" ) ) ;
	activateTipWindow( ) ;
end

function mummyTip( )
	setTipTitle( getString( "mummytiptitle" ) ) ;
	setTipText( getString( "mummytip" ) ) ;
	activateTipWindow( ) ;
end

function tablesTip( )
	setTipTitle( getString( "tablestiptitle" ) ) ;
	setTipText( getString( "tablestip" ) ) ;
	activateTipWindow( ) ;
end

function wormTip( )
	setTipTitle( getString( "wormtiptitle" ) ) ;
	setTipText( getString( "wormtip" ) ) ;
	activateTipWindow( ) ;
end

function eatGooTip( )
	setTipTitle( getString( "eatgootiptitle" ) ) ;
	setTipText( getString( "eatgootip" ) ) ;
	activateTipWindow( ) ;
end

function eatGoo2Tip( )
	setTipTitle( getString( "eatgoo2tiptitle" ) ) ;
	setTipText( getString( "eatgoo2tip" ) ) ;
	activateTipWindow( ) ;
end

function eatBrainTip( )
	setTipTitle( getString( "eatbraintiptitle" ) ) ;
	setTipText( getString( "eatbraintip" ) ) ;
	activateTipWindow( ) ;
end

function eatBambiTip( )
	setTipTitle( getString( "eatbambitiptitle" ) ) ;
	setTipText( getString( "eatbambitip" ) ) ;
	activateTipWindow( ) ;
end

function eatSwordTip( )
	setTipTitle( getString( "eatswordtiptitle" ) ) ;
	setTipText( getString( "eatswordtip" ) ) ;
	activateTipWindow( ) ;
end

function eatTeapotTip( )
	setTipTitle( getString( "eatteapottiptitle" ) ) ;
	setTipText( getString( "eatteapottip" ) ) ;
	activateTipWindow( ) ;
end

function eatTogaTip( )
	setTipTitle( getString( "eattogatiptitle" ) ) ;
	setTipText( getString( "eattogatip" ) ) ;
	activateTipWindow( ) ;
end

function eatBallistaTip( )
	setTipTitle( getString( "eatballistatiptitle" ) ) ;
	setTipText( getString( "eatballistatip" ) ) ;
	activateTipWindow( ) ;
end

function eatPaperTip( )
	setTipTitle( getString( "eatpapertiptitle" ) ) ;
	setTipText( getString( "eatpapertip" ) ) ;
	activateTipWindow( ) ;
end