Ejemplo n.º 1
0
 public void RemoveAllVariables()
 {
     for (int i = 0; i < variables.Count; i++)
     {
         CustomAnchor   anchor    = gridVariable.FirstOrDefault(x => x.objectAnchored == variables[i]);
         VariableObjeto oldObject = anchor.objectAnchored as VariableObjeto;
         variables.Remove(oldObject);
         anchor.NotifyDetached(oldObject.Anchorable);
         Destroy(oldObject.gameObject);
         anchor.gameObject.SetActive(false);
         activeVariableAnchors--;
         i--;
         m.NumberVariables--;
     }
 }
Ejemplo n.º 2
0
 public void RemoveAllObjects()
 {
     for (int i = 0; i < objects.Count; i++)
     {
         CustomAnchor anchor    = gridObjeto.FirstOrDefault(x => x.objectAnchored == objects[i]);
         ObjetoBase   oldObject = anchor.objectAnchored as ObjetoBase;
         objects.Remove(oldObject);
         anchor.NotifyDetached(oldObject.Anchorable);
         Destroy(oldObject.gameObject);
         anchor.gameObject.SetActive(false);
         activeObjectAnchors--;
         i--;
         m.NumberObjetos--;
     }
 }
Ejemplo n.º 3
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");
     }
 }
Ejemplo n.º 4
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");
     }
 }