コード例 #1
0
 /// <summary>
 /// Adds the listener.
 /// </summary>
 protected virtual void AddListener()
 {
     if ((Line != null) && (Line.Target != null))
     {
         listener = Utilites.GetOrAddComponent <TransformListener>(Line.Target);
         listener.OnTransformChanged.AddListener(SetVerticesDirty);
     }
 }
コード例 #2
0
 /// <summary>
 /// Adds the self listener.
 /// </summary>
 protected void AddSelfListener()
 {
     if (currentTransformListener == null)
     {
         currentTransformListener = GetComponent <TransformListener>();
     }
     if (currentTransformListener != null)
     {
         currentTransformListener.OnTransformChanged.AddListener(SetVerticesDirty);
     }
 }
コード例 #3
0
 /// <summary>
 /// Adds the listener.
 /// </summary>
 protected virtual void AddListener()
 {
     if ((Line != null) && (Line.Target != null))
     {
         listener = Line.Target.GetComponent <TransformListener>();
         if (listener == null)
         {
             listener = Line.Target.gameObject.AddComponent <TransformListener>();
         }
         listener.OnTransformChanged.AddListener(SetVerticesDirty);
     }
 }