Пример #1
0
    public void SparseUpdate()
    {
        // GeneratorHerd should clean up
        if (gameObject == null)
        {
            return;
        }

        Bounds = GetBounds();

        if (Config.FloatUp)
        {
            Vector3 size   = Bounds.size;
            Vector3 center = Bounds.center;
            float   bottom;
            if (Config.WorldIsAR)
            {
                // See if it's right!
                bottom = center[2] - size[2] / 2;
            }
            else
            {
                bottom = center[1] - size[1] / 2;
            }

            if (bottom > 0.0f)
            {
                bottom = 0.0f;
            }

            floatUp.Set(-bottom);
        }
    }
Пример #2
0
    void OnValue(string key, float value)
    {
        if (lsys == null)
        {
            return;
        }

        Touch();

        if (key == velValueKey)
        {
            velocityValueFilter.Set(value);
        }

        if (key == speedValueKey)
        {
            speedValueFilter.Set(value);
        }
    }