예제 #1
0
    /// Get a plane mesh of the size "size"
    public static Mesh GetHumanPlaneMesh(Vector2 size, Direction direction)
    {
        float id = (size.x + size.y * 666f) + (int)direction * 333f;

        if (MeshPool.humanPlanes.ContainsKey(id))
        {
            return(MeshPool.humanPlanes[id].mesh);
        }
        MeshPool.humanPlanes.Add(id, MeshPool.GenHumanMesh(size, direction));
        return(MeshPool.humanPlanes[id].mesh);
    }