dofile("Scripts/levelManager.lua");

LManager = LevelManager.create();

LManager:AddGame(eGAME_METER);
--LManager:AddGame(eGAME_SPIN);
--LManager:AddGame(eGAME_RECALL);
--LManager:AddGame(eGAME_SHELL);
--LManager:AddGame(eGAME_COMBO);

LManager:AddTable(eTYPE_TABLE1, 280, 315);
LManager:AddTable(eTYPE_TABLE2, 490, 315);
LManager:AddTable(eTYPE_TABLE3, 380, 430);

seated = LManager.GenSeated(eTYPE_SEATED2);
seated.tableIdx = 1;
LManager:AddSeated(seated);

seated = LManager.GenSeated(eTYPE_SEATED3);
seated.tableIdx = 2;
LManager:AddSeated(seated);

seated = LManager.GenSeated(eTYPE_SEATED4);
seated.tableIdx = 3;
LManager:AddSeated(seated);

guest = LManager.GenGuest(eTYPE_GUEST3);
guest.needs[1] = eWANT_DRINK;
guest.times[1] = 23000;
guest.needs[2] = eWANT_TALK;
guest.times[2] = 54000;
guest.needs[3] = eWANT_GIFT;
guest.times[3] = 73000;
guest.needs[4] = eWANT_DRINK;
guest.times[4] = 90000;
guest.needs[5] = eWANT_GIFT;
guest.times[5] = 126000;
LManager:AddGuest(guest);

guest = LManager.GenGuest(eTYPE_GUEST4);
guest.needs[1] = eWANT_DRINK;
guest.times[1] = 3000;
guest.needs[2] = eWANT_DRINK;
guest.times[2] = 33000;
guest.needs[3] = eWANT_TALK;
guest.times[3] = 83000;
guest.needs[4] = eWANT_GIFT;
guest.times[4] = 133000;
LManager:AddGuest(guest);

guest = LManager.GenGuest(eTYPE_GUEST5);
guest.needs[1] = eWANT_TALK;
guest.times[1] = 13000;
guest.needs[2] = eWANT_TALK;
guest.times[2] = 63000;
guest.needs[3] = eWANT_GIFT;
guest.times[3] = 103000;
guest.needs[4] = eWANT_DRINK;
guest.times[4] = 123000;
guest.needs[5] = eWANT_TALK;
guest.times[5] = 139000;
LManager:AddGuest(guest);

LManager:AdjustGuestHappiness(150);
LManager:SetSnackTime(20000);

LManager:SetLevelNumber(1,3);
LManager:SetLevelScores(1450, 2600);
LManager:SetLevelTime(50000);

gameObject = LManager:GenerateGameObject();

levelSetting = LManager:GenerateLevelSettings();

TutorialSteps =
{
	start =
	{ 
		action = "onTrigger = function() end",
		
		triggers = 
		{
			[1] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_METER", next = "step01" },
		}
	},
	
	step01 =
	{
		action = "onTrigger = function() FreezeTime(); TextBox(25, 330, \"Another conversation has started.  Give the guy a hand and help him focus on his date's interest.\", 5000); end",
		
		triggers = 
		{
			[1] = { condition = "TEXTBOX_DONE", data = "", next = "step02" },
			[2] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WRONG", next = "step03" },
			[3] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WIN", next = "step04" },
		}
	},
	
	step02 = 
	{
		action = "onTrigger = function() UnfreezeTime(); PlaceArrow(465, 246); TextBox(25, 330, \"When the arrow highlights the matching topic click on it.\", 9999000); end",
		
		triggers = 
		{
			[1] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WRONG", next = "step03" },
			[2] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WIN", next = "step04" },
		}
	},

	step03 = 
	{
		action = "onTrigger = function() UnfreezeTime(); TextBox(25, 330, \"Keep trying.  Make sure the topic icon matches the one on the left.\", 9999000); end",
		
		triggers = 
		{
			[1] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WIN", next = "step04" },
			[2] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_DONE", next = "step05" },
		}
	},
	
	step04= 
	{
		action = "onTrigger = function() UnfreezeTime(); HideArrows(); TextBox(25, 330, \"Another conversation completed successfully. \", 8000); end",
		
		triggers = 
		{		
		}
	},

	step05= 
	{
		action = "onTrigger = function() UnfreezeTime(); HideArrows(); TextBox(25, 330, \"Try again next time. \", 9999000); end",
		
		triggers = 
		{		
		}
	},
}