public void setLabels(Excercise exercise)
 {
     {
         exercise.setExercise();
         exercise.GetComponentInChildren <Text>().text = exercise.exercise;
     }
 }
示例#2
0
 private void Start()
 {
     player       = FindObjectOfType <Player>();
     liveManager  = FindObjectOfType <Live>();
     levelManager = FindObjectOfType <LevelManager>();
     exercise     = FindObjectOfType <Excercise>();
     enemyManager = FindObjectOfType <Enemy>();
 }
 private void Awake()
 {
     player   = FindObjectOfType <Player>();
     exercise = FindObjectOfType <Excercise>();
     hits     = FindObjectOfType <HitsExercise>();
     stop     = FindObjectOfType <StopMovement>();
     tt       = FindObjectOfType <TutorialTrigger>();
     weapon   = FindObjectOfType <Weapon>();
     enemy    = FindObjectOfType <Enemy>();
 }
示例#4
0
 void Awake()
 {
     exercise     = FindObjectOfType <Excercise>();
     levelManager = FindObjectOfType <LevelManager>();
 }
        public void setLabels(Excercise exercise)
        {
            if (PlayerPrefs.GetInt("MathLevel") == 1)
            {
                if (PlayerPrefs.GetInt("level") == 1)
                {
                    int operation = UnityEngine.Random.Range(1, 5);
                    exercise.setAdditionExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else if (PlayerPrefs.GetInt("level") == 2)
                {
                    int operation = UnityEngine.Random.Range(6, 10);
                    exercise.setAdditionExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else if (PlayerPrefs.GetInt("level") == 3)
                {
                    int operation = UnityEngine.Random.Range(1, 10);
                    exercise.setAdditionExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else
                {
                    exercise.setAdditionExercise();
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
            }

            if (PlayerPrefs.GetInt("MathLevel") == 2)
            {
                if (PlayerPrefs.GetInt("level") == 1)
                {
                    int operation = UnityEngine.Random.Range(1, 5);
                    exercise.setSubtractionExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else if (PlayerPrefs.GetInt("level") == 2)
                {
                    int operation = UnityEngine.Random.Range(6, 10);
                    exercise.setSubtractionExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else if (PlayerPrefs.GetInt("level") == 3)
                {
                    int operation = UnityEngine.Random.Range(1, 10);
                    exercise.setSubtractionExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else
                {
                    exercise.setSubtractionExercise();
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
            }

            if (PlayerPrefs.GetInt("MathLevel") == 3)
            {
                if (PlayerPrefs.GetInt("level") == 1)
                {
                    int operation = UnityEngine.Random.Range(1, 5);
                    exercise.setMultiplicationExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else if (PlayerPrefs.GetInt("level") == 2)
                {
                    int operation = UnityEngine.Random.Range(6, 10);
                    exercise.setMultiplicationExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else if (PlayerPrefs.GetInt("level") == 3)
                {
                    int operation = UnityEngine.Random.Range(1, 10);
                    exercise.setMultiplicationExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else
                {
                    exercise.setMultiplicationExercise();
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
            }

            if (PlayerPrefs.GetInt("MathLevel") == 4)
            {
                if (PlayerPrefs.GetInt("level") == 1)
                {
                    int operation = UnityEngine.Random.Range(1, 5);
                    exercise.setMultiplicationExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else if (PlayerPrefs.GetInt("level") == 2)
                {
                    int operation = UnityEngine.Random.Range(6, 10);
                    exercise.setMultiplicationExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else if (PlayerPrefs.GetInt("level") == 3)
                {
                    int operation = UnityEngine.Random.Range(1, 10);
                    exercise.setMultiplicationExercise(operation);
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
                else
                {
                    exercise.setDivisionExercise();
                    exercise.GetComponentInChildren <Text>().text = exercise.exercise;
                }
            }
        }
示例#6
0
 private void Start()
 {
     exercise = FindObjectOfType <Excercise>();
 }
示例#7
0
 public void changePosition(Excercise exercise, int changeValue)
 {
     exercise.transform.Translate(0, changeValue * 500, 0);
 }
示例#8
0
 void Awake()
 {
     exercise = FindObjectOfType <Excercise>();
 }
 // Start is called before the first frame update
 private void Awake()
 {
     player   = FindObjectOfType <Player>();
     exercise = FindObjectOfType <Excercise>();
 }
示例#10
0
 void Start()
 {
     player   = FindObjectOfType <Player>();
     exercise = FindObjectOfType <Excercise>();
 }