コード例 #1
0
        public void AddNodeFlags(UIPanel parent)
        {
            AssertNotNull(parent, "parent");
            Assertion.Assert(NetUtil.IsNodeValid(nodeID_), $"IsNodeValid({nodeID_})");

            var mask = ARTool.GetUsedFlagsNode(nodeID_);

            foreach (var flag in mask.ExtractPow2Flags())
            {
                NodeFlagToggle.Add(parent, nodeID_, flag);
            }
        }
コード例 #2
0
ファイル: FlagsPanel.cs プロジェクト: xlf1024/AdvancedRoads
        public void AddNodeFlags(UIPanel parent)
        {
            AssertNotNull(parent, "parent");
            NetUtil.AssertSegmentValid(segmentID_);

            var mask = ARTool.GetUsedFlagsNode(nodeID_);

            foreach (var flag in mask.ExtractPow2Flags())
            {
                NodeFlagToggle.Add(parent, nodeID_, flag);
            }
        }
コード例 #3
0
        public void AddSegmentEndFlags(UIPanel container)
        {
            AssertNotNull(container, "container");
            NetUtil.AssertSegmentValid(segmentID_);
            Assertion.Assert(NetUtil.IsNodeValid(nodeID_), $"IsNodeValid({nodeID_})");

            var mask = ARTool.GetUsedFlagsSegmentEnd(segmentID: segmentID_, nodeID: nodeID_);

            foreach (var flag in mask.ExtractPow2Flags())
            {
                SegmentEndFlagToggle.Add(container, segmentID: segmentID_, nodeID: nodeID_, flag: flag);
            }
        }
コード例 #4
0
        public void AddSegmentFlags(UIPanel container)
        {
            LogCalled();
            AssertNotNull(container, "container");
            NetUtil.AssertSegmentValid(segmentID_);
            var mask = ARTool.GetUsedFlagsSegment(segmentID_).Segment;

            foreach (var flag in mask.ExtractPow2Flags())
            {
                SegmentFlagToggle.Add(container, segmentID_, flag);
            }

            foreach (var lane in NetUtil.GetSortedLanes(segmentID_))
            {
                var laneMask = ARTool.GetUsedCustomFlagsLane(lane);
                //Log.Info($"lane:{lane} laneMask:" + laneMask);
                if (laneMask != 0)
                {
                    AddLaneFlags(container, lane, laneMask);
                }
            }
        }