
-- Informació sobre els logros del nostre joc

function Init_Achivements()
	is_Reached_Achivement_Coins50 = false;
	is_Reached_Achivement_Coins100 = false;
	is_Reached_Achivement_Coins150 = false;
	is_Reached_Achivement_Coins200 = false;
	is_Reached_Achivement_Coins250 = false;
	is_Reached_Achivement_Coins300 = false;
	is_Reached_Achivement_enemiesDefated50 = false;
	is_Reached_Achivement_kingPaulDefated = false;
	is_Reached_Achivement_GetGems3 = false;
	is_Reached_Achivement_GetGems7 = false;
	is_Reached_Achivement_DiscoverTemple = false;
	is_Reached_Achivement_Feller = false;
	is_Reached_Achivement_BarrelBroken20 = false;
	is_Reached_Achivement_SaveSeaUrchin1 = false;
	is_Reached_Achivement_SaveSeaUrchin4 = false;
	is_Reached_Achivement_WalkOnWater = false;
	is_Reached_Achivement_HideCoins = false;
	is_Reached_Achivement_Die20Times = false;
	is_Reached_Achivement_NoDie = false;
	is_Reached_Achivement_DieWater = false;
	is_Reached_Achivement_5SecondsOnWater = false;
	is_Reached_Achivement_MegaTwisterKill = false;
	is_Reached_Achivement_DiggOctopus = false;
	is_Reached_Achivement_DiggFirstOctopus = false;
	is_Reached_Achivement_AccidentKill = false;
	is_Reached_Achivement_HomeRun = false;
	is_Reached_Achivement_Watermelon = false;
	is_Reached_Achivement_BonusCoins = false;
	is_Reached_Achivement_BossDefeated = false;
	
end

function Unlock_Achivement_Coins50()
	if( is_Reached_Achivement_Coins50 == false ) then
		appearGUIAchivement( "Msg_Achivement_Coins50" );
		is_Reached_Achivement_Coins50 = true;
		unlockAchivement( "my_treasure" );
	end
end

function Unlock_Achivement_Coins100()
	if( is_Reached_Achivement_Coins100 == false ) then
		appearGUIAchivement( "Msg_Achivement_Coins100" );
		is_Reached_Achivement_Coins100 = true;
		unlockAchivement( "into_my_piggy_bank" );
	end
end

function Unlock_Achivement_Coins150()
	if( is_Reached_Achivement_Coins150 == false ) then
		appearGUIAchivement( "Msg_Achivement_Coins150" );
		is_Reached_Achivement_Coins150 = true;
		unlockAchivement( "half_rich" );
	end
end

function Unlock_Achivement_Coins200()
	if( is_Reached_Achivement_Coins200 == false ) then
		appearGUIAchivement( "Msg_Achivement_Coins200" );
		is_Reached_Achivement_Coins200 = true;
		unlockAchivement( "thifty_pirate" );
	end
end

function Unlock_Achivement_Coins250()
	if( is_Reached_Achivement_Coins250 == false ) then
		appearGUIAchivement( "Msg_Achivement_Coins250" );
		is_Reached_Achivement_Coins250 = true;
		unlockAchivement( "stashing_feels_good" );
	end
end

function Unlock_Achivement_Coins300()
	if( is_Reached_Achivement_Coins300 == false ) then
		appearGUIAchivement( "Msg_Achivement_Coins300" );
		is_Reached_Achivement_Coins300 = true;
		unlockAchivement( "golden_sea" );
	end
end

function Unlock_Achivement_enemiesDefated50()
	if( is_Reached_Achivement_enemiesDefated50 == false ) then
		appearGUIAchivement( "Msg_Achivement_enemiesDefated50" );
		is_Reached_Achivement_enemiesDefated50 = true;
		unlockAchivement( "rowing_away" );
	end
end

function Unlock_Achivement_kingPaulDefated()
	if( is_Reached_Achivement_kingPaulDefated == false ) then
		appearGUIAchivement( "Msg_Achivement_kingPaulDefated" );
		is_Reached_Achivement_kingPaulDefated = true;
		unlockAchivement( "king_paul" );
	end
end

function Unlock_Achivement_GetGems3()
	if( is_Reached_Achivement_GetGems3 == false ) then
		appearGUIAchivement( "Msg_Achivement_GetGems3" );
		is_Reached_Achivement_GetGems3 = true;
		unlockAchivement( "diamond_fever" );
	end
end

function Unlock_Achivement_GetGems7()
	if( is_Reached_Achivement_GetGems7 == false ) then
		appearGUIAchivement( "Msg_Achivement_GetGems7" );
		is_Reached_Achivement_GetGems7 = true;
		unlockAchivement( "diamond_friend" );
	end
end

function Unlock_Achivement_DiscoverTemple()
	if( is_Reached_Achivement_DiscoverTemple == false ) then
		appearGUIAchivement( "Msg_Achivement_DiscoverTemple" );
		is_Reached_Achivement_DiscoverTemple = true;
		unlockAchivement( "revenge_coming" );
	end
end

function Unlock_Achivement_Feller()
	if( is_Reached_Achivement_Feller == false ) then
		appearGUIAchivement( "Msg_Achivement_Feller" );
		is_Reached_Achivement_Feller = true;
		unlockAchivement( "tree_down" );
	end
end

function Unlock_Achivement_BarrelBroken20()
	if( is_Reached_Achivement_BarrelBroken20 == false ) then
		appearGUIAchivement( "Msg_Achivement_BarrelBroken20" );
		is_Reached_Achivement_BarrelBroken20 = true;
		unlockAchivement( "barrel" );
	end
end

function Unlock_Achivement_SaveSeaUrchin1()
	if( is_Reached_Achivement_SaveSeaUrchin1 == false ) then
		appearGUIAchivement( "Msg_Achivement_SaveSeaUrchin1" );
		is_Reached_Achivement_SaveSeaUrchin1 = true;
		unlockAchivement( "seaurchin1" );
	end
end

function Unlock_Achivement_SaveSeaUrchin4()
	if( is_Reached_Achivement_SaveSeaUrchin4 == false ) then
		appearGUIAchivement( "Msg_Achivement_SaveSeaUrchin4" );
		is_Reached_Achivement_SaveSeaUrchin4 = true;
		unlockAchivement( "new_hero" );
	end
end

function Unlock_Achivement_WalkOnWater()
	if( is_Reached_Achivement_WalkOnWater == false ) then
		appearGUIAchivement( "Msg_Achivement_WalkOnWater" );
		is_Reached_Achivement_WalkOnWater = true;
		unlockAchivement( "lightning_speed" );
	end
end

function Unlock_Achivement_hidenCoinsFound()
	if( is_Reached_Achivement_HideCoins == false ) then
		appearGUIAchivement( "Msg_Achivement_HideCoins" );
		is_Reached_Achivement_HideCoins = true;
		unlockAchivement( "hidden_coins" );
	end
end

function Unlock_Achivement_Die20Times()
	if( is_Reached_Achivement_Die20Times == false ) then
		appearGUIAchivement( "Msg_Achivement_Die20Times" );
		is_Reached_Achivement_Die20Times = true;
		unlockAchivement( "lazy_day" );
	end
end

function Unlock_Achivement_NoDie()
	if( is_Reached_Achivement_NoDie == false ) then
		appearGUIAchivement( "Msg_Achivement_NoDie" );
		is_Reached_Achivement_NoDie = true;
		unlockAchivement( "fabled" );
	end
end

function Unlock_Achivement_DieWater()
	if( is_Reached_Achivement_DieWater == false ) then
		appearGUIAchivement( "Msg_Achivement_DieWater" );
		is_Reached_Achivement_DieWater = true;
		unlockAchivement( "die_water" );
	end
end

function Unlock_Achivement_5SecondsOnWater()
	if( is_Reached_Achivement_5SecondsOnWater == false ) then
		appearGUIAchivement( "Msg_Achivement_5SecondsOnWater" );
		is_Reached_Achivement_5SecondsOnWater = true;
		unlockAchivement( "5seconds_water" );
	end
end

function Unlock_Achivement_MegaTwisterKill()
	if( is_Reached_Achivement_MegaTwisterKill == false ) then
		appearGUIAchivement( "Msg_Achivement_MegaTwisterKill" );
		is_Reached_Achivement_MegaTwisterKill = true;
		unlockAchivement( "go_the_hell" );
	end
end

function Unlock_Achivement_DiggOctopus()
	if( is_Reached_Achivement_DiggOctopus == false ) then
		appearGUIAchivement( "Msg_Achivement_DiggOctopus" );
		is_Reached_Achivement_DiggOctopus = true;
		unlockAchivement( "expert_digger" );
	end
end

function Unlock_Achivement_DiggFirstOctopus()
	if( is_Reached_Achivement_DiggFirstOctopus == false ) then
		appearGUIAchivement( "Msg_Achivement_DiggFirstOctopus" );
		is_Reached_Achivement_DiggFirstOctopus = true;
		unlockAchivement( "first_octopus" );
	end
end

function Unlock_Achivement_AccidentKill()
	if( is_Reached_Achivement_AccidentKill == false ) then
		appearGUIAchivement( "Msg_Achivement_AccidentKill" );
		is_Reached_Achivement_AccidentKill = true;
		unlockAchivement( "accident_kill" );
	end
end

function Unlock_Achivement_HomeRun()
	if( is_Reached_Achivement_HomeRun == false ) then
		appearGUIAchivement( "Msg_Achivement_HomeRun" );
		is_Reached_Achivement_HomeRun = true;
		unlockAchivement( "homerun" );
	end
end

function Unlock_Achivement_Watermelon()
	if( is_Reached_Achivement_Watermelon == false ) then
		appearGUIAchivement( "Msg_Achivement_Watermelon" );
		is_Reached_Achivement_Watermelon = true;
		unlockAchivement( "watermelon" );
	end
end

function Unlock_Achivement_BonusCoins()
	if( is_Reached_Achivement_BonusCoins == false ) then
		appearGUIAchivement( "Msg_Achivement_BonusCoins" );
		is_Reached_Achivement_BonusCoins = true;
		unlockAchivement( "last" );
	end
end

function Unlock_Achivement_BossDefeated()
	if( is_Reached_Achivement_BossDefeated == false ) then
		appearGUIAchivement( "Msg_Achivement_BossDefeated" );
		is_Reached_Achivement_BossDefeated = true;
	end
end