Ejemplo n.º 1
0
    public DrawObject GetFreeRainLine()
    {
        for (int i = 0; i < allLines.Count; i++)
        {
            if (!allLines[i].IsAvailable)
            {
                return(allLines[i]);
            }
        }

        RainLine tmpLine = new RainLine();

        allLines.Add(tmpLine);

        return(tmpLine);
    }
Ejemplo n.º 2
0
    public void  GenOneRainLine()
    {
        Vector3 tmpPos = Vector3.zero;

        tmpPos.x = Random.Range(0, 1.0f);

        tmpPos.y = 1;

        Vector2 direct = Vector2.zero;

        direct.x = 0.5f;

        RainLine tmpLine = (RainLine)GetFreeRainLine();

        tmpLine.Reset(tmpPos, direct);

        tmpLine.callBack = new UnityEngine.Events.UnityAction <Vector3>(RainWillDisappear);


        //   Debug.Log("line Count==");
    }