Example #1
0
 public void RemoveOneVariable(CustomAnchorable c)
 {
     if (activeVariableAnchors > 0)
     {
         CustomAnchor   anchor    = gridVariable.FirstOrDefault(x => x.objectAnchored == c);
         VariableObjeto oldObject = anchor.objectAnchored as VariableObjeto;
         variables.Remove(oldObject);
         anchor.NotifyDetached(oldObject.Anchorable);
         Destroy(oldObject.gameObject);
         anchor.gameObject.SetActive(false);
         activeVariableAnchors--;
         Debug.Log(activeObjectAnchors);
         m.NumberVariables--;
     }
     else
     {
         Debug.Log("No existen objetos creados");
     }
 }
Example #2
0
 public void RemoveOneObject(CustomAnchorable c)
 {
     if (activeObjectAnchors > 0)
     {
         CustomAnchor anchor    = gridObjeto.FirstOrDefault(x => x.objectAnchored == c);
         ObjetoBase   oldObject = anchor.objectAnchored as ObjetoBase;
         objects.Remove(oldObject);
         anchor.NotifyDetached(oldObject.Anchorable);
         Destroy(oldObject.gameObject);
         anchor.gameObject.SetActive(false);
         activeObjectAnchors--;
         Debug.Log(activeObjectAnchors);
         m.NumberObjetos--;
     }
     else
     {
         Debug.Log("No existen objetos creados");
     }
 }