public void MenuOption() { shotTypeSetter = Instantiate(shotTypeSetter); Model _hero = app.model; shotTypeSetter.MainShotBulletSetter(_hero.myShot).SecondaryShotBulletSetter(_hero.mySecondaryShot).FocusShotBulletSetter(_hero.myFocusShot).SetBomb(_hero.bomb.myBomb).MainShotSetter(_hero.allMainShots[0], _hero.allMainShots[1], _hero.allMainShots[2]).SecondaryShotSetter(_hero.allSecondaryShots[0], _hero.allSecondaryShots[1], _hero.allSecondaryShots[2]).FocusShotSetter(_hero.allFocusShots[0], _hero.allFocusShots[1], _hero.allFocusShots[2]).SpeedSetter(_hero.maxSpeed).LivesSetter(_hero.maxLives).BombsSetter(_hero.maxBombs).MainShotCooldownSetter(_hero.maxCooldown).SecondaryCooldownSetter(_hero.secMaxCooldown).FocusCooldownSetter(_hero.focMaxCooldown).DamageSetter(_hero.damage).BombDamageSetter(_hero.bombDamage).HitboxSetter(_hero.boxC.bounds.size.x).BombDurationSetter(_hero.bombMaxDuration); EventManager.ClearAllEvents(); SceneManager.LoadScene("Level"); _hero.score = 0; Time.timeScale = 1; }
public void MenuOption() { if (gameObject.activeSelf) { shotTypeSetter = Instantiate(shotTypeSetter); shotSetter.SetShots(); shotTypeSetter.MainShotSetter(new NormalShot(1, 5), new NormalShot(3, 5), new NormalShot(5, 5)).SetBomb(shotSetter.bomb).SecondaryShotSetter(shotSetter.allshots[0], shotSetter.allshots[1], shotSetter.allshots[2]).FocusShotSetter(shotSetter.allshots[3], shotSetter.allshots[4], shotSetter.allshots[5]).SpeedSetter(speed).LivesSetter(lives).BombsSetter(bombs).MainShotCooldownSetter(cooldown).SecondaryCooldownSetter(secCooldown).FocusCooldownSetter(focCooldown).DamageSetter(damage).BombDamageSetter(bombDamage).HitboxSetter(hitboxSize).BombDurationSetter(bombDuration).MainShotBulletSetter(shotBullets[0]).SecondaryShotBulletSetter(shotBullets[1]).FocusShotBulletSetter(shotBullets[2]); EventManager.ClearAllEvents(); SceneManager.LoadScene("Level"); } }