Ejemplo n.º 1
0
    public void SwapTexture(BugMVideo b)
    {
//		Debug.Log ("Swapped");
        b.transform.GetChild(0).gameObject.GetComponent <MaterialSwapperContinuous> ().swapMat((int)(Random.value * 6));
        SetMeshAttributes att  = b.transform.GetChild(0).GetComponent <SetMeshAttributes>();
        float             prev = att.whichBug;
        float             curr = prev++;

        if (prev > 7)
        {
            curr = 0;
        }
        att.whichBug = curr;
        att.Set();
    }
Ejemplo n.º 2
0
    void OnTriggerEnter(Collider c)
    {
        BugMVideo    b = c.GetComponent <BugMVideo>();
        F_VomitMover v = c.GetComponent <F_VomitMover> ();

        if (b != null)
        {
            handler.EatBug();
        }
        if (v != null)
        {
            for (int i = 0; i < 10; i++)
            {
                handler.EatBug();
            }
        }
    }
Ejemplo n.º 3
0
    public void LevelUp(BugMVideo b)
    {
//		handler.EatBug();
//		score.GetComponent<keepScore>().AddToScore();
    }
Ejemplo n.º 4
0
 public void ResetPosition(BugMVideo b)
 {
     RigidParent.transform.GetChild(b.id).transform.position = GetRandomPositionCircle();
 }
Ejemplo n.º 5
0
    public void ProcessCollision(BugMVideo b)
    {
        ParticleSystem p = Instantiate(particleBursts[(int)(Random.value * particleBursts.Length)], b.transform.position, Quaternion.identity) as ParticleSystem;

        p.Emit(10);
    }