refactor(Connect): 重构连接体系,实现一个物体拥有多个连接线
This commit is contained in:
@@ -95,27 +95,22 @@ namespace Script.Gameplay.Facility
|
||||
return transform.position;
|
||||
}
|
||||
|
||||
public GameObject GetGameObject()
|
||||
{
|
||||
return gameObject;
|
||||
}
|
||||
|
||||
public string GetConnectableName()
|
||||
{
|
||||
return gameObject.name;
|
||||
}
|
||||
|
||||
public ConnectionLine OutputConnectionLine { get; set; }
|
||||
public ConnectionLine InputConnectionLine { get; set; }
|
||||
|
||||
public bool IsConnectedOutput { get; set; }
|
||||
public bool IsConnectedInput { get; set; }
|
||||
|
||||
public void ReceiveSignal(bool active, GameObject sender)
|
||||
public List<ConnectionLine> ConnectionLines { get; set; } = new List<ConnectionLine>();
|
||||
public void SignalActive(bool active, GameObject sender)
|
||||
{
|
||||
Interact(sender);
|
||||
}
|
||||
|
||||
public void SendSignal(bool active, GameObject sender)
|
||||
{
|
||||
OutputConnectionLine.ReceiveSignal(active);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user