public PathController(QueryTool tool)
        {
            queryTool = tool;
            currentHighlightType = HighlightType.None;

            Config.instance.eventConfigChanged += () => { OnConfigChanged(); };

            Log.info("Load Line Material...");

            Color red = new Color(1, 0, 0);
            Color gold = new Color(1, 0.9f, 0);

            string lineShader = ResourceLoader.loadResourceString("Materials/Shaders/TransparentVertexLit.shader");

            lineMaterial = new Material(lineShader);
            lineMaterial.color = red;
            lineMaterial.SetColor("_Emission", red);
            lineMaterial.SetColor("_SpecColor", Color.black); //Disable shine effect
            lineMaterial.mainTexture = ResourceLoader.loadTexture("Materials/NewSkin.png");
            lineMaterial.renderQueue = 100;

            lineMaterialHighlight = new Material(lineMaterial);
            lineMaterialHighlight.color = gold;
            lineMaterialHighlight.SetColor("_Emission", gold);
            lineMaterial.renderQueue = 101;

            Texture pin = ResourceLoader.loadTexture("Materials/Pin.png");

            activeSegmentIndicator = Billboard.Create(Billboard.CreateSpriteMaterial(pin, Color.green));
            vehicleIndicator = Billboard.CreateSpriteMaterial(pin, red);
            vehicleIndicatorHighlight = Billboard.CreateSpriteMaterial(pin, gold);

            Log.debug("PathController initialized");
        }
Exemplo n.º 2
0
        public PathController(QueryTool tool)
        {
            queryTool            = tool;
            currentHighlightType = HighlightType.None;

            Config.instance.eventConfigChanged += () => { OnConfigChanged(); };

            Log.info("Load Line Material...");

            Color red  = new Color(1, 0, 0);
            Color gold = new Color(1, 0.9f, 0);

            string lineShader = ResourceLoader.loadResourceString("Materials/Shaders/TransparentVertexLit.shader");

            lineMaterial       = new Material(lineShader);
            lineMaterial.color = red;
            lineMaterial.SetColor("_Emission", red);
            lineMaterial.SetColor("_SpecColor", Color.black); //Disable shine effect
            lineMaterial.mainTexture = ResourceLoader.loadTexture("Materials/NewSkin.png");
            lineMaterial.renderQueue = 100;

            lineMaterialHighlight       = new Material(lineMaterial);
            lineMaterialHighlight.color = gold;
            lineMaterialHighlight.SetColor("_Emission", gold);
            lineMaterial.renderQueue = 101;


            Texture pin = ResourceLoader.loadTexture("Materials/Pin.png");

            activeSegmentIndicator    = Billboard.Create(Billboard.CreateSpriteMaterial(pin, Color.green));
            vehicleIndicator          = Billboard.CreateSpriteMaterial(pin, red);
            vehicleIndicatorHighlight = Billboard.CreateSpriteMaterial(pin, gold);

            Log.debug("PathController initialized");
        }
Exemplo n.º 3
0
        public override void OnLevelLoaded(LoadMode mode)
        {
            GameObject gameController = GameObject.FindWithTag("GameController");

            if (gameController)
            {
                Log.debug(gameController.ToString());
                queryTool         = gameController.AddComponent <QueryTool>();
                queryTool.enabled = false;
            }
        }
Exemplo n.º 4
0
        public override void OnLevelLoaded(LoadMode mode)
        {
            GameObject gameController = GameObject.FindWithTag("GameController");
            if (gameController)
            {
                Log.debug(gameController.ToString());
                queryTool = gameController.AddComponent<QueryTool>();
                queryTool.enabled = false;

            }
        }
Exemplo n.º 5
0
        void RegisterTool()
        {
            DeRegister();

            try {
                GameObject gameController = GameObject.FindWithTag("GameController");
                if (gameController)
                {
                    Log.debug(gameController.ToString());
                    queryTool = gameController.AddComponent <QueryTool>();
                    ToolsModifierControl.SetTool <DefaultTool>();
                }
            }
            catch (Exception e)
            {
                Log.error(e.ToString());
            }
        }
Exemplo n.º 6
0
 public TrafficAnalyzer(QueryTool _tool)
 {
     working = false;
     tool    = _tool;
 }