Beispiel #1
0
    private void MakeGridChecks()
    {
        List <GameObject> markerList = new List <GameObject>(markers.Keys);

        foreach (GameObject markerObj in markerList)
        {
            Marker marker = markerObj.GetComponent <Marker>();
            int    check  = treeGrid.CheckNeighbors(markers[markerObj], marker);
            if (check != 0)
            {
                animationLock.Dec();
                markers.Remove(markerObj);
                Destroy(markerObj);

                if (!keyboardLock)
                {
                    keyboardLock = true;
                    if (!isFreeFall || stoppingFall)
                    {
                        stoppingFall        = false;
                        isFreeFall          = true;
                        freeFallStartTime   = Time.time;
                        freeFallStartHeight = currentHeight;
                    }
                }
            }
        }
    }