Ejemplo n.º 1
0
    void Start()
    {
        bounds = new Bounds(center, 2 * extend * DefaultVoxManager.getDefault().getRatio());
        ps     = GetComponent <ParticleSystem>();

        switch (mode)
        {
        case ParticleSystemEmitMode.GRAVITY:
            impl = new ParticleSystemObjectGravityImpl(bounds, ps, heightRange, needTranslation);
            break;

        case ParticleSystemEmitMode.NORMAL:
            impl = new ParticleSystemObjectImpl(bounds, ps, heightRange, needTranslation);
            break;

        case ParticleSystemEmitMode.FIREWORK:
            impl = new ParticleSystemObjectFireworksImpl(bounds, ps, heightRange, needTranslation);
            break;

        case ParticleSystemEmitMode.CONTINUOUS:
            impl = new ParticleSystemObjectContinuousImpl(bounds, ps, heightRange, needTranslation);
            break;

        default:
            throw new NotImplementedException();
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        objectsWorld = DefaultVoxManager.getDefault().objectsWorld;
        fishvelocity = 5 * RandomWalkVelocity(objectsWorld, transform.position);
        MeshNormalObject self = GetComponent <MeshNormalObject>();

        self.listener = this;
    }
Ejemplo n.º 3
0
 void OnCollisionEnter(Collision col)
 {
     if (col.gameObject.name.Contains("Hand"))
     {
         DefaultVoxManager.getDefault().onBubble(col.gameObject.transform.position);
         suicide();
     }
 }
 void Start()
 {
     bounds = new Bounds(center, 2 * extend * DefaultVoxManager.getDefault().getRatio());
     pe     = GetComponent <EllipsoidParticleEmitter>();
     impl   = new ParticleEmitObjectImpl(bounds, pe, heightRange);
 }