RoomManager.PlayerIsNear C# (CSharp) 메소드

PlayerIsNear() 공개 메소드

public PlayerIsNear ( int x, int y ) : bool
x int
y int
리턴 bool
    public bool PlayerIsNear(int x, int y)
    {
        int near = 15;

        var playerPos = PlayerController.instance.transform.position;
        return x < (int)(playerPos.x + 15.5) + near &&
                   x > (int)(playerPos.x + 15.5) - near &&
                   y < (int)(playerPos.y + 15.5) + near &&
                   y > (int)(playerPos.y + 15.5) - near;
    }