Exemplo n.º 1
0
    public void TryToReturnFromIsolate(string structureName)
    {
        if (GameObject.Find(structureName + "(Clone)") == null)
        {
            Debug.Log("Tried to return from isolation the structure '" + structureName + "', which could not be found");
            return;
        }

        foreach (MovingStructureWithDirection movingStructure in movingStructures)
        {
            if (movingStructure.structure.ModelTransform.name == structureName + "(Clone)")
            {
                return;
            }
        }

        TryToReturnIsolatedStructure(structureName);
        if (customMessages != null)
        {
            customMessages.SendTryToReturnIsolatedStructureMessage(structureName);
        }
        Debug.Log("Try to return from isolate is done for " + structureName);
    }