コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        if (isRunning)
        {
            if (timeSinceLastMove * 1000 < PauseTimeMs)
            {
                timeSinceLastMove += Time.deltaTime;
            }
            else
            {
                // Record data
                int id       = Emitter.GetID();
                var pvOutput = Planeverb.PlaneverbContext.GetOutput(id);
                wetGainData[dataCount] = pvOutput.wetGain;
                dryGainData[dataCount] = pvOutput.occlusion;
                doorData[dataCount]    = dataCount;

                // Move door and pause
                timeSinceLastMove = 0;
                Vector3 position = Door.position;
                position.z   += doorZIncrement;
                Door.position = position;

                // Check for completion
                dataCount++;
                if (dataCount >= doorData.Length)
                {
                    ClearState();
                    Debug.Log("WetDryDoor Data Logging Ended");
                }
            }
        }
        else if (Input.GetKeyDown(KeyTrigger))
        {
            ClearState();
            isRunning = true;
            Debug.Log("WetDryDoor Data Logging Started");
        }
    }
コード例 #2
0
 // getters
 public int GetEmissionID()
 {
     return(emitter.GetID());
 }