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); }
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; }