//	World2.cpp - One of the worlds.
//  ----------------------------------------------------------------------------
//	This file is part of 'NiallsAVLib', base code for any kind of audiovisual
//	apps.
//	Copyright (C) 2012  Niall Moody
//	
//	This program is free software: you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation, either version 3 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program.  If not, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#include "World2.h"

//------------------------------------------------------------------------------
World2::World2():
World(ThreeFloats(134.0f/255.0f, 172.0f/255.0f, 136.0f/255.0f),
	  ThreeFloats(170.0f/255.0f, 100.0f/255.0f, 0.0f/255.0f),
	  ThreeFloats(14.0f/255.0f, 83.0f/255.0f, 5.0f/255.0f),
	  ThreeFloats(184.0f/255.0f, 21.0f/255.0f, 0.0f/255.0f),
	  ThreeFloats(1.0f, 0.94f, 0.6f),
	  TwoFloats(2640.0f, 720.0f)),
done(false)
{

}

//------------------------------------------------------------------------------
World2::~World2()
{

}

//------------------------------------------------------------------------------
void World2::mouseMove(const TwoFloats& pos)
{
	detector.setMousePos(pos);
}

//------------------------------------------------------------------------------
void World2::subclassTick()
{
	if(detector.update())
	{
		float tempf = getOverallScale();

		if(tempf < 0.66f)
		{
			tempf += 0.0025f;
			setOverallScale(tempf);
		}

		if(getOverallScale() >= 0.66f)
			done = true;
	}
}
