示例#1
0
        // Use this for initialization
        void Awake()
        {
            StartCoroutine(WaitForDevice());

            if (OnThresholdExceeded == null)
            {
                OnThresholdExceeded = new EventThresholdLevel();
            }
        }
示例#2
0
        void Awake()
        {
            lowPassFilterFactor = accelerometerUpdateInterval / lowPassKernelWidthInSeconds;
            lowPassAccel        = Input.acceleration;

            if (OnShake == null)
            {
                OnShake = new EventThresholdLevel();
            }
        }