/// <summary> /// 添加方格位置移动信息 /// </summary> /// <param name="gridItem"></param> /// <param name="moveInfo"></param> public void AddMoveInfo(GridItem gridItem, GridMoveInfo moveInfo) { _gridMoveInfoMap.Add(gridItem, moveInfo); }
/// <summary> /// 获取方格位置移动信息 /// </summary> /// <param name="gridItem"></param> /// <param name="moveInfo"></param> /// <returns></returns> public bool TryGetMoveInfo(GridItem gridItem, out GridMoveInfo moveInfo) { return _gridMoveInfoMap.TryGetValue(gridItem, out moveInfo); }