Exemplo n.º 1
0
        protected override void Awake()
        {
            try
            {
                analyzer = new TrafficAnalyzer(this);

                Log.info("Load Cursor...");
                m_cursor           = CursorInfo.CreateInstance <CursorInfo>();
                m_cursor.m_texture = ResourceLoader.loadTexture(32, 32, "Materials/Cursor.png");
                m_cursor.m_hotspot = new Vector2(20, 20);

                loadingCursor           = CursorInfo.CreateInstance <CursorInfo>();
                loadingCursor.m_texture = ResourceLoader.loadTexture(32, 32, "Materials/Hourglass.png");

                Log.info("Create GUI...");
                gui           = new GameObject("QueryToolGUI").AddComponent <QueryToolGUI>();
                gui.queryTool = this;

                Log.info("QueryTool awoken");
            }
            catch (Exception e)
            {
                Log.error(e.ToString());
            }
            base.Awake();
        }
Exemplo n.º 2
0
        protected override void Awake()
        {
            Log.debug("Create Button");
            toggleButton             = ReportButton.Create();
            toggleButton.eventClick += OnButtonToggled;

            Log.debug("Create UI...");
            ui                     = ReportUI.Create();
            ui.enabled             = false;
            ui.absolutePosition    = new Vector2(-1000, 0);
            ui.eventHighlightType += (String s) => { SetHighlight(s); };

            Log.debug("Create Analyzer...");
            analyzer           = new TrafficAnalyzer();
            analyzer.OnReport += OnGotReport;

            Log.debug("Create Path Controller...");
            paths = new PathController(this);

            Log.info("Load Cursor...");
            m_cursor           = CursorInfo.CreateInstance <CursorInfo>();
            m_cursor.m_texture = ResourceLoader.loadTexture("Materials/Cursor.png");
            m_cursor.m_hotspot = new Vector2(0, 0);

            loadingCursor           = CursorInfo.CreateInstance <CursorInfo>();
            loadingCursor.m_texture = ResourceLoader.loadTexture("Materials/Hourglass.png");

            Log.info("QueryTool awoken");
            base.Awake();
        }
Exemplo n.º 3
0
        protected override void Awake()
        {
            Log.debug("Create Button");
            toggleButton = ReportButton.Create();
            toggleButton.eventClick += OnButtonToggled;

            Log.debug("Create UI...");
            ui = ReportUI.Create();
            ui.enabled = false;
            ui.absolutePosition = new Vector2(-1000, 0);
            ui.eventHighlightType += (String s) => { SetHighlight(s); };

            Log.debug("Create Analyzer...");
            analyzer = new TrafficAnalyzer();
            analyzer.OnReport += OnGotReport;

            Log.debug("Create Path Controller...");
            paths = new PathController(this);

            Log.info("Load Cursor...");
            m_cursor = CursorInfo.CreateInstance<CursorInfo>();
            m_cursor.m_texture = ResourceLoader.loadTexture("Materials/Cursor.png");
            m_cursor.m_hotspot = new Vector2(0, 0);

            loadingCursor = CursorInfo.CreateInstance<CursorInfo>();
            loadingCursor.m_texture = ResourceLoader.loadTexture("Materials/Hourglass.png");

            Log.info("QueryTool awoken");
            base.Awake();
        }