Exemple #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();
        }
    }
Exemple #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;
    }
Exemple #3
0
 void OnCollisionEnter(Collision col)
 {
     if (col.gameObject.name.Contains("Hand"))
     {
         DefaultVoxManager.getDefault().onBubble(col.gameObject.transform.position);
         suicide();
     }
 }
Exemple #4
0
    void Awake()
    {
        UnityEngine.Debug.Log("Awake");
        if (NeedRegister)
        {
            manager = this;
        }

        QualitySettings.vSyncCount  = 0;
        Application.targetFrameRate = 20;

        initConfig();
        initBounds();
        ledseq = initLedSeq();
    }
 void Start()
 {
     bounds = new Bounds(center, 2 * extend * DefaultVoxManager.getDefault().getRatio());
     pe     = GetComponent <EllipsoidParticleEmitter>();
     impl   = new ParticleEmitObjectImpl(bounds, pe, heightRange);
 }