Example #1
0
 private void Update()
 {
     if (currentShapeProvider != polyShapeProvider.UsedObject)
     {
         OnPolyShapeProviderChange(currentShapeProvider, polyShapeProvider.UsedObject);
         currentShapeProvider = polyShapeProvider.UsedObject;
     }
 }
Example #2
0
 private void Update()
 {
     if (old != polyShapeProvider.UsedObject)
     {
         OnPolyShapeProviderChange(old, polyShapeProvider.UsedObject);
         old = polyShapeProvider.UsedObject;
     }
 }
Example #3
0
 public void OnPolyShapeProviderChange(IPolyShapeProvider oldObj, IPolyShapeProvider newObj)
 {
     currentShapeProvider = newObj;
     if (oldObj != null)
     {
         oldObj.OnPolyShapeChange -= OnDraw;
     }
     if (newObj != null)
     {
         newObj.OnPolyShapeChange += OnDraw;
         Draw();
     }
 }
Example #4
0
 public void OnPolyShapeProviderChange(IPolyShapeProvider oldObj, IPolyShapeProvider newObj)
 {
     if (oldObj != null)
     {
         oldObj.OnPolyShapeChange -= Draw;
     }
     if (newObj != null)
     {
         newObj.OnPolyShapeChange += Draw;
         lastPolyShape             = newObj.Poly;
     }
     else
     {
         lastPolyShape = null;
     }
     needGenerateMesh = true;
     SetVerticesDirty();
 }
Example #5
0
 void OnDraw(IPolyShapeProvider pp)
 {
     Draw();
 }
Example #6
0
 void Draw(IPolyShapeProvider polyShapeProvider)
 {
     lastPolyShape    = polyShapeProvider.Poly;
     needGenerateMesh = true;
     SetVerticesDirty();
 }