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(); }
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(); } } }
public void LevelUp(BugMVideo b) { // handler.EatBug(); // score.GetComponent<keepScore>().AddToScore(); }
public void ResetPosition(BugMVideo b) { RigidParent.transform.GetChild(b.id).transform.position = GetRandomPositionCircle(); }
public void ProcessCollision(BugMVideo b) { ParticleSystem p = Instantiate(particleBursts[(int)(Random.value * particleBursts.Length)], b.transform.position, Quaternion.identity) as ParticleSystem; p.Emit(10); }