예제 #1
0
 /// <summary>
 /// 删除目标对象
 /// </summary>
 /// <param name="targetNode"></param>
 public void RemoveTarget([NotNull] MultiLinkNode <T> targetNode)
 {
     if (targetNodeList.Contains(targetNode))
     {
         targetNodeList.Remove(targetNode);
     }
 }
예제 #2
0
 /// <summary>
 /// 删除源对象
 /// </summary>
 /// <param name="sourceNode"></param>
 public void RemoveSource([NotNull] MultiLinkNode <T> sourceNode)
 {
     if (sourceNodeList.Contains(sourceNode))
     {
         sourceNodeList.Remove(sourceNode);
     }
 }
예제 #3
0
 /// <summary>
 /// 添加源对象
 /// </summary>
 /// <param name="sourceNode">源对象</param>
 public void AddSource([NotNull] MultiLinkNode <T> sourceNode)
 {
     if (!sourceNodeList.Contains(sourceNode))
     {
         sourceNodeList.Add(sourceNode);
     }
 }
예제 #4
0
 /// <summary>
 /// 添加目标对象
 /// </summary>
 /// <param name="targetNode">目标对象</param>
 public void AddTarget([NotNull] MultiLinkNode <T> targetNode)
 {
     if (!targetNodeList.Contains(targetNode))
     {
         targetNodeList.Add(targetNode);
     }
 }
예제 #5
0
    /// <summary>
    /// 设置塔数据
    /// </summary>
    /// <param name="towerData">他单元数据</param>
    public void SetTowerData([NotNull] int[,] towerData)
    {
        height = towerData.GetLength(0);
        wight  = towerData.GetLength(1);
        // 初始化本地数据
        towerCellDataArray = towerData;
        towerCellArray     = new TheFiveCellBase[height, wight];
        transDirArray      = new MultiLinkNode <TheFiveCellBase> [height, wight];
        // 加载地图Cell数据
        // 如果该位置为null则只绘制底板

        // 初始化链接

        // 刷新列表
        RefreshCells();
    }