public void IntroduceMutation(InfectedMutations a_Mutation) { m_hasLevelStarted = false; m_MiddleOfScreenCountdown = durationInMiddleOfScreen; m_InterpolationParam = 0f; transform.position = m_textStartPosition; transform.localScale = textStartScale; m_MutationTitle.text = "Mutation: "; switch (a_Mutation) { case InfectedMutations.none: m_MutationTitle.text = string.Empty; m_MutationDescription.text = string.Empty; break; case InfectedMutations.moveFaster: m_MutationTitle.text += moveFasterTitle; m_MutationDescription.text = moveFasterDescription; break; case InfectedMutations.biggerSize: m_MutationTitle.text += biggerSizeTitle; m_MutationDescription.text = biggerSizeDescription; break; case InfectedMutations.surviveLonger: m_MutationTitle.text += surviveLongerTitle; m_MutationDescription.text = surviveLongerDescription; break; case InfectedMutations.moreStartInfected: m_MutationTitle.text += moreStartInfectedTitle; m_MutationDescription.text = moreStartInfectedDescription; break; case InfectedMutations.leavesAoeAfterDeath: m_MutationTitle.text += leavesAoeAfterDeathTitle; m_MutationDescription.text = leavesAoeAfterDeathDescription; break; case InfectedMutations.splitsIntoTwoUponDeath: m_MutationTitle.text += splitsIntoTwoUponDeathTitle; m_MutationDescription.text = splitsIntoTwoUponDeathDescription; break; } }
public void PreLevelLoad() { NPCs = new List <NPC>(); var levelManager = FindObjectOfType <LevelManager>(); int nextLevelNum = levelManager.NumLevelsPassed + 1; if (nextLevelNum == m_LevelNum) //check for replayed level { } else if (nextLevelNum == 2 || nextLevelNum == 4 || nextLevelNum == 5 || nextLevelNum >= 7) { currentMutation = (InfectedMutations)Random.Range(1, 7); //set a random mutation } else { currentMutation = InfectedMutations.none; } m_LevelNum = nextLevelNum; mutationText.IntroduceMutation(currentMutation); }