コード例 #1
0
ファイル: Board.cs プロジェクト: mpcomplete/gamejam2020
    public LightNode MarchLightTree(LightSource source, Dictionary <PlayObject, List <LightBeam> > collisions, int maxDepth)
    {
        LightNode root = new LightNode {
            Object     = source,
            Position   = WorldPositionToGrid(source.transform.position),
            LightBeams = source.ComputeOutgoingLightBeams(null)
        };

        foreach (LightBeam lightBeam in root.LightBeams)
        {
            root.LightNodes.Add(March(root.Position, lightBeam, collisions, maxDepth));
        }
        return(root);
    }