public static RobotBTree GetTree(Player p) { PlayerAIExt ai = new PlayerAIExt(p); RobotBTree tree = new RobotBTree(ai); tree.Load(json); return(tree); }
public Player() { tree = AIManager.GetTree(this); mineList = new List <MapGrid>(); GameObject go = Resources.Load <GameObject>(AssetPathUtil.GetPlayerPath(0)); obj = GameObject.Instantiate <GameObject>(go); spRender = obj.GetComponent <SpriteRenderer>(); spRender.sortingLayerName = LayerUtil.SORTING_LAYER_PLAYER; Color = new Color(156 / 255F, 255 / 255f, 137 / 255f); checkGrid = new CheckGrid(this); //_direction = new Vector3(-0.3f, -1, 0).normalized; }