Beispiel #1
0
    void OnEnable()
    {
        // init the serial connections
        axiomserialController.Init();
        bfPedalController.Init();
        bfWheelController.Init();
        bfTiltController.Init();

        layerIndices = new Dictionary <Layers, int>();

        smoothingMethod      = SmoothingMethod.Average;
        wheelSmooth          = new float[wheelSmoothFactor];
        invWheelSmoothFactor = 1f / wheelSmoothFactor;

        //- debug

        profiler = GameProfiler.Get("GameProfiler");
        var settings = profiler.Add("Raw");

        settings.min = 0;
        settings.max = 60;
        var settings2 = profiler.Add("Median");

        settings2.min = 0;
        settings2.max = 60;
        var settings3 = profiler.Add("Mean");

        settings3.min = 0;
        settings3.max = 60;
    }
    void OnEnable()
    {
        profiler = GameProfiler.Get("GameProfiler");
        var settings = profiler.Add("notReadyCounter");

        settings.min    = 0;
        settings.max    = 100;
        settings.height = 401;
    }
    void OnEnable()
    {
        profiler = GameProfiler.Get("GameProfiler");
        if (profiler.GetCount() < 19)
        {
            pos = transform.position;

            string id       = name + " speed";
            var    settings = profiler.Add(id);
            settings.min    = 0;
            settings.max    = maxSpeed;
            settings.height = 201;

            if (isSimulationElement)
            {
                id              = name + " target speed";
                settings        = profiler.Add(id);
                settings.min    = 0;
                settings.max    = maxSpeed;
                settings.height = 101;

                id              = name + " acceleration";
                settings        = profiler.Add(id);
                settings.min    = -0.2f;
                settings.max    = 0.2f;
                settings.height = 101;

                simElement = GetComponent <SimulationElement>();
            }
        }
        else
        {
            profiler = null;
            enabled  = false;
        }
    }
Beispiel #4
0
    void OnEnable()
    {
        bfController.Init();

        if (bfController.isActive)
        {
            profiler = FindObjectOfType <GameProfiler>();
            profiler.Add(bfController.GetName());
            var set = profiler.GetSettings(bfController.GetName());
            set.min = 0;
            set.max = 360;
        }

        angle = 0f;
    }