private void OnTriggerEnter(Collider other) { Combinable otherComb = other.gameObject.GetComponent <Combinable>(); if (otherComb != null) { int i = otherComb.Compare(id); if (i != -1 && fullOf == "SANDWICH") { fullOf = otherComb.trickName[i]; TrickManager._instance.AddTrick(otherComb.trickName[i], otherComb.score[i]); return; } i = otherComb.Compare(idDrink); if (i != -1) { TrickManager._instance.AddTrick(fullOf + " " + otherComb.trickName[i], otherComb.score[i]); fullOf = "SANDWICH"; if (pickup != null) { pickup.ForceDrop(); } transform.position = defaultPos; transform.rotation = defaultRot; return; } i = otherComb.Compare(idDrink2); if (i != -1) { TrickManager._instance.AddTrick(otherComb.trickName[i], otherComb.score[i]); fullOf = "SANDWICH"; if (pickup != null) { pickup.ForceDrop(); } transform.position = defaultPos; transform.rotation = defaultRot; } } }
private void OnTriggerEnter(Collider other) { Combinable otherComb = other.gameObject.GetComponent <Combinable>(); if (otherComb != null) { int i = otherComb.Compare(id); if (i != -1) { TrickManager._instance.AddTrick(otherComb.trickName[i], otherComb.score[i]); } } }
private void OnTriggerEnter(Collider other) { Combinable otherComb = other.gameObject.GetComponent <Combinable>(); if (otherComb != null) { int i = otherComb.Compare(id); if (i != -1 && fullOf == "TOOTH") { fullOf = otherComb.trickName[i]; TrickManager._instance.AddTrick(otherComb.trickName[i], otherComb.score[i]); return; } i = otherComb.Compare(idDrink); if (i != -1) { TrickManager._instance.AddTrick(fullOf + " " + otherComb.trickName[i], otherComb.score[i]); fullOf = "TOOTH"; } } }
private void OnTriggerEnter(Collider other) { Combinable otherComb = other.gameObject.GetComponent <Combinable>(); if (otherComb != null) { int i = otherComb.Compare(id); if (i != -1 && fullOf == "") { fullOf = otherComb.trickName[i]; TrickManager._instance.AddTrick(otherComb.trickName[i], otherComb.score[i]); renderer.material.color = otherComb.color[i]; return; } i = otherComb.Compare(idDrink); if (i != -1 && fullOf != "") { TrickManager._instance.AddTrick(otherComb.trickName[i] + " " + fullOf, otherComb.score[i]); renderer.material.color = emptyColor; fullOf = ""; } } }