using UnityEngine;
using System.Collections;

public class GameScene : Scene
{
	GameObject _boardPrefab;
	LetterBoard _letterBoard;
	
	public override void Awake ()
	{
		base.Awake();
		_boardPrefab = Resources.Load("Prefabs/LetterBoard") as GameObject;
	}
	
	public override void activate()
	{
		base.activate();
		
		float boardWidth = (Globals.BoardWidth * Globals.TileSize);
		float boardHeight = (Globals.BoardHeight * Globals.TileSize);
		GameObject letterBoard = Instantiate(_boardPrefab, new Vector3(
			((Globals.ScreenWidth / 2.0f) - (boardWidth / 2.0f)) + (Globals.TileSize / 2.0f), 
			((Globals.ScreenHeight / 2.0f) - (boardHeight / 2.0f)) + (Globals.TileSize / 2.0f), 
			0), Quaternion.identity) as GameObject;
		
		_letterBoard = letterBoard.GetComponent<LetterBoard>();
	}
	
	public override void UpdateScene()
	{
		base.UpdateScene();
		
		/*if(Input.GetKeyDown(KeyCode.Alpha1))
			GameManager.shared.SetScene(SCENE_TYPE.MAIN_MENU);
		
		Vector3 mouseWorldPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
		_letter.transform.position = new Vector3(mouseWorldPosition.x, mouseWorldPosition.y, _letter.transform.position.z);
		
		if(Input.GetMouseButtonDown(0))
		{
			_letter.transform.localScale *= 1.1f;	
		}*/
	}
	
	public override void deactivate()
	{
		base.deactivate();
		Debug.Log("FUCKER");
		Destroy(_letterBoard.gameObject);
		
	}
	
	public override void Pause()
	{
		base.Pause();
	}
	
	public override void Unpause()
	{
		base.Unpause();
		
	}
}





















