function KingOfTheHill:StartActivity()
	print("START! -- KingOfTheHill:StartActivity()!");
	self.HoldArea = SceneMan.Scene:GetArea("KOTH Hold Area");
	self.Timer1 = Timer();
	self.Timer2 = Timer();
	self.Left1 = 180000; -- 3 minutes.
	self.Left2 = 180000; -- 3 minutes.
	local LZ1 = SceneMan.Scene:GetArea("LZ Team 1");
	local LZ2 = SceneMan.Scene:GetArea("LZ Team 2");
	local brain1 = CreateActor("Brain Case");
	brain1.Pos = Vector(0,SceneMan.Scene.Height);
	local brain2 = CreateActor("Brain Case");
	brain2.Pos = Vector(SceneMan.Scene.Width,SceneMan.Scene.Height);
	self:SetPlayerBrain(brain1,Activity.PLAYER_1);
	self:SetPlayerBrain(brain2,Activity.PLAYER_2);
	MovableMan:AddActor(brain1);
	MovableMan:AddActor(brain2);
	self:SetLandingZone(LZ1:GetCenterPoint(), Activity.PLAYER_1);
	self:SetLandingZone(LZ2:GetCenterPoint(), Activity.PLAYER_2);
end

function KingOfTheHill:PauseActivity(pause)
    	print("PAUSE! -- KingOfTheHill:PauseActivity()!");
end

function KingOfTheHill:EndActivity()
    	print("END! -- KingOfTheHill:EndActivity()!");
end


function KingOfTheHill:UpdateActivity()
	local Player1 = self:GetControlledActor(Activity.PLAYER_1);
	local Player2 = self:GetControlledActor(Activity.PLAYER_2);

	--See who's holding the area.
	local PointHolder = nil;
	if MovableMan:IsActor(Player1) then
		if self.HoldArea:IsInside(Player1.Pos) then
			PointHolder = Activity.TEAM_1;
		end
	end
	if MovableMan:IsActor(Player2) then
		if self.HoldArea:IsInside(Player2.Pos) then
			PointHolder = Activity.TEAM_2;
		end
	end
	if MovableMan:IsActor(Player1) and MovableMan:IsActor(Player2) then
		if self.HoldArea:IsInside(Player1.Pos) and self.HoldArea:IsInside(Player2.Pos) then
			PointHolder = -1;
		end
	end	

	--Mark the objectives.
	self:ClearObjectivePoints();
	if self.ActivityState ~= Activity.OVER then
		if PointHolder == nil then
			self:AddObjectivePoint("Hold this point!", self.HoldArea:GetCenterPoint()+Vector(0,-96), Activity.TEAM_2, GameActivity.ARROWDOWN);
			self:AddObjectivePoint("Hold this point!", self.HoldArea:GetCenterPoint()+Vector(0,-96), Activity.TEAM_1, GameActivity.ARROWDOWN);
		end
		if PointHolder == -1 then
			self:AddObjectivePoint("Hold for " .. math.ceil(self.Left1/1000) .. " seconds!", Player1.AboveHUDPos + Vector(0,-4), Activity.TEAM_1, GameActivity.ARROWDOWN);
			self:AddObjectivePoint("Hold for " .. math.ceil(self.Left2/1000) .. " seconds!", Player2.AboveHUDPos + Vector(0,-4), Activity.TEAM_2, GameActivity.ARROWDOWN);
			self:AddObjectivePoint("Kill before " .. math.ceil(self.Left1/1000) .. " seconds are up!", Player1.AboveHUDPos + Vector(0,-4), Activity.TEAM_2, GameActivity.ARROWDOWN);
			self:AddObjectivePoint("Kill before " .. math.ceil(self.Left2/1000) .. " seconds are up!", Player2.AboveHUDPos + Vector(0,-4), Activity.TEAM_1, GameActivity.ARROWDOWN);
			self.Left1 = self.Left1+self.Timer1:LeftTillSimMS(0);
			self.Left2 = self.Left2+self.Timer2:LeftTillSimMS(0);
		end
		if PointHolder == Activity.TEAM_1 then
			self:AddObjectivePoint("Hold for " .. math.ceil(self.Left1/1000) .. " seconds!", Player1.AboveHUDPos + Vector(0,-4), Activity.TEAM_1, GameActivity.ARROWDOWN);
			self:AddObjectivePoint("Kill before " .. math.ceil(self.Left1/1000) .. " seconds are up!", Player1.AboveHUDPos + Vector(0,-4), Activity.TEAM_2, GameActivity.ARROWDOWN);
			self:AddObjectivePoint("Hold this point!", self.HoldArea:GetCenterPoint()+Vector(0,-96), Activity.TEAM_2, GameActivity.ARROWDOWN);
			self.Left1 = self.Left1+self.Timer1:LeftTillSimMS(0);
		end
		if PointHolder == Activity.TEAM_2 then
			self:AddObjectivePoint("Hold for " .. math.ceil(self.Left2/1000) .. " seconds!", Player2.AboveHUDPos + Vector(0,-4), Activity.TEAM_2, GameActivity.ARROWDOWN);
			self:AddObjectivePoint("Kill before " .. math.ceil(self.Left2/1000) .. " seconds are up!", Player2.AboveHUDPos + Vector(0,-4), Activity.TEAM_1, GameActivity.ARROWDOWN);
			self:AddObjectivePoint("Hold this point!", self.HoldArea:GetCenterPoint()+Vector(0,-96), Activity.TEAM_1, GameActivity.ARROWDOWN);
			self.Left2 = self.Left2+self.Timer2:LeftTillSimMS(0);
		end
	end
	self:YSortObjectivePoints();

	self.Timer1:Reset();
	self.Timer2:Reset();

	--Check to see if there's a winner.
	if self.Left1 <= 0 then
		self.WinnerTeam = Activity.TEAM_1;
		ActivityMan:EndActivity();
	end

	if self.Left2 <= 0 then
		self.WinnerTeam = Activity.TEAM_2;
		ActivityMan:EndActivity();
	end
end