Exemplo n.º 1
0
    void OnTriggerExit(Collider collider)
    {
        BuildingBlockScript buildingBlockScript = collider.transform.GetComponent <BuildingBlockScript>();

        if (!containsBlock && buildingBlockScript)
        {
            foreach (string tag in buildingBlockScript.GetSnappablePoints())
            {
                if (tag == snapPointTag)
                {
                    buildingBlockScript.UnSnap(this.transform);
                }
            }
        }
    }
Exemplo n.º 2
0
    void OnTriggerEnter(Collider collider)
    {
        BuildingBlockScript buildingBlockScript = collider.transform.GetComponent <BuildingBlockScript>();

        if (!containsBlock && buildingBlockScript)
        {
            foreach (string tag in buildingBlockScript.GetSnappablePoints())
            {
                if (tag == snapPointTag)
                {
                    if (buildingBlockScript.Snap(this.transform))
                    {
                        BuildingSystemScript.instance.PutInPauseMode();
                    }
                }
            }
        }
    }