Example #1
0
        public void RegisterLine(Vector3 start, Vector3 end, Color color, float timer, bool noZTest)
        {
            DrawLineEntry entry = null;

            for (int ix = 0; ix < _lineEntries.Count; ix++)
            {
                if (!_lineEntries[ix].occupied)
                {
                    entry = _lineEntries[ix];
                    break;
                }
            }
            if (entry == null)
            {
                entry = new DrawLineEntry();
                _lineEntries.Add(entry);
            }

            entry.occupied    = true;
            entry.start       = start;
            entry.end         = end;
            entry.color       = color;
            entry.timer       = timer;
            entry.noZTest     = noZTest;
            _linesNeedRebuild = true;
        }
Example #2
0
                public void RegisterLine(Vector3 start, Vector3 end, Color color, float timer, bool no_z_test)
                {
                    this.CheckInitialized();

                    DrawLineEntry entry = null;

                    foreach (var t in this._line_entries)
                    {
                        if (!t._Occupied)
                        {
                            entry = t;
                            break;
                        }
                    }

                    if (entry == null)
                    {
                        entry = new DrawLineEntry();
                        this._line_entries.Add(entry);
                    }

                    entry._Occupied          = true;
                    entry._Start             = start;
                    entry._End               = end;
                    entry._Color             = color;
                    entry._Timer             = timer;
                    entry._NoZTest           = no_z_test;
                    this._lines_need_rebuild = true;
                }