예제 #1
0
    IEnumerator WaitSendArea()
    {
        yield return(new WaitForSeconds(0.05f));

        foreach (i_AreaListener AL in myListeners)
        {
            AL.ChangeArea(NowArea);
        }
    }
예제 #2
0
    IEnumerator CheckPlayerInArea()
    {
        if (AreaCode != NowArea)
        {
            if (playerTR.position.x > myBorder [2] && playerTR.position.x < myBorder [3] &&
                playerTR.position.y <myBorder [0] && playerTR.position.y> myBorder[1])
            {
                NowArea      = AreaCode;
                AI.camLeftX  = myBorder [4];
                AI.camRightX = myBorder [5];
                foreach (i_AreaListener AL in myListeners)
                {
                    AL.ChangeArea(NowArea);
                }
            }
        }
        else if (!nowForceMove && (playerTR.position.x < myBorder [2] || playerTR.position.x > myBorder [3]))
        {
            StartCoroutine(IE_ForcePlayerMove());
        }
        yield return(checkTime);

        StartCoroutine(CheckPlayerInArea());
    }