36 lines
1007 B
C#
36 lines
1007 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// 连线中间节点
|
|
/// </summary>
|
|
public class Line_mid : PermanentTriggerBase
|
|
{
|
|
public Line_group line_Group;
|
|
/// <summary>
|
|
/// 所属线
|
|
/// </summary>
|
|
private Line_item line_Item;
|
|
|
|
public void Init(Line_group line_group)
|
|
{
|
|
this.line_Group = line_group;
|
|
if(!line_group.line_Mids.Contains(this))
|
|
line_group.line_Mids.Add(this);
|
|
}
|
|
|
|
public void MyOnMDown()
|
|
{
|
|
if (line_Group.currentLine_Item != null && line_Group.currentLine_Item.line_Ends[1]==null && line_Item==null)
|
|
{
|
|
if (GameManager.ProcessMgr == null || GameManager.ProcessMgr?.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
|
|
{
|
|
//当前无所属线,当前有连线,且未连接完成,才能连中间点
|
|
line_Item = line_Group.currentLine_Item;
|
|
line_Group.currentLine_Item.AddPoint(this);
|
|
}
|
|
}
|
|
}
|
|
}
|