EVERYTHING
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public sealed class NodePort
|
||||
{
|
||||
public int Index;
|
||||
|
||||
public string Name;
|
||||
|
||||
public PortDirection Direction;
|
||||
|
||||
public PortKind Kind;
|
||||
|
||||
public BSValue Value = BSValue.None;
|
||||
|
||||
public int SourceGroupId;
|
||||
|
||||
public Node Owner;
|
||||
|
||||
public List<NodePort> Connections = new List<NodePort>();
|
||||
|
||||
public NodePort IncomingConnection;
|
||||
|
||||
[NonSerialized]
|
||||
public Transform VisualTransform;
|
||||
|
||||
[NonSerialized]
|
||||
public Renderer[] VisualRenderers;
|
||||
|
||||
[NonSerialized]
|
||||
public MaterialPropertyBlock VisualBlock;
|
||||
|
||||
[NonSerialized]
|
||||
public TMP_Text LabelText;
|
||||
|
||||
[NonSerialized]
|
||||
public Vector3 BaseLocalScale = Vector3.one;
|
||||
|
||||
[NonSerialized]
|
||||
public bool Highlighted;
|
||||
|
||||
[NonSerialized]
|
||||
public float PulseUntil;
|
||||
|
||||
[NonSerialized]
|
||||
public Color LastTint = new Color(float.NaN, float.NaN, float.NaN, float.NaN);
|
||||
|
||||
public void AttachVisual(Transform visualTransform)
|
||||
{
|
||||
VisualTransform = visualTransform;
|
||||
BaseLocalScale = ((visualTransform != null) ? visualTransform.localScale : Vector3.one);
|
||||
}
|
||||
|
||||
public void AttachVisualRenderers(Renderer[] renderers)
|
||||
{
|
||||
VisualRenderers = renderers;
|
||||
if (VisualBlock == null)
|
||||
{
|
||||
VisualBlock = new MaterialPropertyBlock();
|
||||
}
|
||||
}
|
||||
|
||||
public void AttachLabel(TMP_Text labelText)
|
||||
{
|
||||
LabelText = labelText;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user