Example #1
0
    public static void ProcessFunctionToObjects(ProcessingFunction func, string name, TargetObject to)
    {
        if (IsValidArgs(name) == false)
        {
            return;
        }

        List <GameObject> list = poolDic[name].objectList;

        int count      = 0;
        int startIndex = 0;

        if (to == TargetObject.ACTIVE_ONLY)
        {
            count      = poolDic[name].ActiveCount;
            startIndex = poolDic[name].InActiveCount;
        }
        else if (to == TargetObject.INACTIVE_ONLY)
        {
            count = poolDic[name].InActiveCount;
        }
        else
        {
            count = poolDic[name].ActiveCount + poolDic[name].InActiveCount;
        }

        for (int i = startIndex; i < startIndex + count; ++i)
        {
            func(list[i]);
        }
    }
    public static void ProcessFunctionToObjects(ProcessingFunction func, string name, TargetObject to)
    {
        if (IsValidArgs(name) == false)
            return;

        List<GameObject> list = poolDic[name].objectList;

        int count = 0;
        int startIndex = 0;

        if (to == TargetObject.ACTIVE_ONLY)
        {
            count = poolDic[name].ActiveCount;
            startIndex = poolDic[name].InActiveCount;
        }
        else if (to == TargetObject.INACTIVE_ONLY)
            count = poolDic[name].InActiveCount;
        else
            count = poolDic[name].ActiveCount + poolDic[name].InActiveCount;

        for (int i = startIndex; i < startIndex + count; ++i)
        {
            func(list[i]);
        }
    }
Example #3
0
        public override void Init()
        {
            base.Init();
            //_firstRun = true;

            _postProcessingBuffer.Clear();

            _thresholdSet = recordingConfig.thresholdSet;
            _movingWindow = new double[windowLength, recordingConfig.nChannels];
            _movingWindowStart = 0;
            _processingFunction = new ProcessingFunction(GetRMS);

            _dataMonitor = new BlockingCollection<object>();
        }