void OnTriggerEnter(Collider other) { if (other.tag == "gate") { if (incrementNumberCheckpoint) { numberCheckpoint += 1; incrementNumberCheckpoint = false; } } if (other.name == "NextSequence01" && numberTrigger != 1) { numberCheckpoint = 0; stepLearning = 3; } if (other.name == "NextSequence02") { numberCheckpoint = 0; stepLearning = 7; } if (other.name == "NextSequence03") { numberCheckpoint = 0; stepLearning = 11; } if (numberTrigger == 1) { if (other.name == "NextSequence01") { scriptTrigger.failLevel(true); stepLearning = 0; } } }
void OnTriggerEnter(Collider other) { if (other.tag == "gate") { if (incrementNumberCheckpoint) { numberCheckpoint += 1; incrementNumberCheckpoint = false; } if (!functionArrowAlreadyPlayed) { functionArrowAlreadyPlayed = true; } } if (other.name == "NextSequence01" && numberTrigger != 1) { numberCheckpoint = 0; stepLearning = 2; } if (other.name == "NextSequence02" && numberTrigger != 2) { numberCheckpoint = 0; stepLearning = 6; } if (other.name == "NextSequence03" && numberTrigger != 3) { numberCheckpoint = 0; stepLearning = 10; } if (numberTrigger == 1) { if (other.name == "NextSequence01") { scriptTrigger.failLevel(false); stepLearning = 0; } } if (numberTrigger == 2) { if (other.name == "NextSequence02") { scriptTrigger.failLevel(false); stepLearning = 4; } } if (numberTrigger == 3) { if (other.name == "NextSequence03") { scriptTrigger.failLevel(false); stepLearning = 9; } } }