Esempio n. 1
0
    void Start()
    {
        top      = transform.parent.Find("top");
        floor    = transform.parent.Find("floor");
        emitter  = transform.parent.Find("emitter").GetComponent <Obi.ObiEmitter>();
        renderer = transform.parent.Find("emitter").GetComponent <ObiParticleRenderer>();

        maxDiff = Vector3.Distance(top.position, floor.position);
    }
Esempio n. 2
0
    public void UpdateRender(ObiParticleRenderer renderer)
    {
        var connectableParticleRendList = _connectableRenderer.particleRenderers.ToList();

        connectableParticleRendList.Remove(renderer);
        _connectableRenderer.particleRenderers = connectableParticleRendList.ToArray();

        var mainParticleRendList = _mainRenderer.particleRenderers.ToList();

        mainParticleRendList.Add(renderer);
        _mainRenderer.particleRenderers = mainParticleRendList.ToArray();
    }
Esempio n. 3
0
    private void Start()
    {
        _prevFrameLocation = transform.position;

        if (canChopRef == null)
        {
            canChopRef = transform.parent.GetComponent <CanChop>();
        }

        if (canChopRef.fluidEmitterRef != null)
        {
            _obiEmitter          = canChopRef.fluidEmitterRef.GetComponent <ObiEmitter>();
            _obiParticleRenderer = canChopRef.fluidEmitterRef.GetComponent <ObiParticleRenderer>();
        }

        if (!colliderAreaRef)
        {
            Physics.IgnoreCollision(colliderAreaRef, this.GetComponent <Collider>());
        }
    }