示例#1
0
	public static Game NewGame(IBindingContext context)
	{
		WorldLogicCoordinateTransform transformer = new WorldLogicCoordinateTransform(0.32f,10,10);
		var boardView = context.Get<BoardView> (InnerBindingNames.Empty,10,10,transformer);

		return new Game(boardView);
	}
示例#2
0
	public static BoardView CreateBoardView(int width, int height,WorldLogicCoordinateTransform transformer)
	{
		var prefab = Resources.Load<GameObject> ("BoardView");

		var go = (GameObject)GameObject.Instantiate (prefab);

		var ret = go.GetComponent<BoardView> ();
		ret.m_transformer = transformer;
		ret.Init (width,height);

		return ret;
	}