示例#1
0
文件: Main.cs 项目: esw777/Tetris
	// Use this for initialization
	void Start () 
	{
		//Intitalize Components.
		m_gameBoard = (GameBoard)(GameObject.Find("o_GameBoard")).GetComponent(typeof(GameBoard));
		m_shapeMaker = (ShapeMaker)(GameObject.Find("o_ShapeMaker")).GetComponent(typeof(ShapeMaker));
		m_playerInput = (PlayerInput)(GameObject.Find("o_PlayerInput")).GetComponent(typeof(PlayerInput));
		m_GameOver = (GameOver)(GameObject.Find("img_GameOver")).GetComponent(typeof(GameOver));

		m_width = 12;
		m_height = 24;
		gameOver = false;
		lastPlayerInput = 0;

		//Init functions
		Debug.Log("Intit 1");
		m_gameBoard.initGameBoard(m_width, m_height);
		Debug.Log("Intit 2");
		m_shapeMaker.initShapeMaker(m_gameBoard);
		Debug.Log("Intit 3");
	} //end start