Objects instantiation moved to script

This commit is contained in:
Mediha Zukic
2017-05-20 11:23:09 +03:00
parent d85ad55dfd
commit 449b69ba71
71 changed files with 384426 additions and 385913 deletions

View File

@@ -1,19 +1,82 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum AnswerObjectModel
{
NOVI_PROZOR,
STARI_PROZOR,
SLOMLJENI_PROZOR,
PROZOR_SA_ROLETNOM,
UPALJENA_CESMA,
UGASENA_CESMA,
PROFESOR_ATOM_10,
ZARNA_SIJALICA,
BICIKLO,
VENTILATOR,
KANTA_ZA_RECIKLIRANJE,
KLIMA,
ADAPTER,
MASINA_ZA_VES,
TERMOSTAT_25,
PREKIDAC_ZA_SVJETLO,
KUCICA_17,
KUCICA_22,
KUCICA_33,
KUCICA_26,
RUCNO_PRANJE_SUDJA,
MASINA_ZA_SUDJE,
STRIK,
RADIJATOR,
TELEVIZOR,
DIMNJAK,
AUTO,
RUCNO_PRANJE_VESA
};
public class Answer
{
public Answer(AnswerObjectModel model, string caption)
{
answerModel = model;
answerCaption = caption;
}
private AnswerObjectModel answerModel;
private string answerCaption;
public string getAnswerCaption()
{
return answerCaption;
}
public AnswerObjectModel getAnswerModel()
{
return answerModel;
}
};
public class Question
{
public Question(string question, int [] answers)
public Question(string question, int [] correctAns)
{
questionText = question;
correctAnswers = answers;
correctAnswers = correctAns;
}
public Question(string question, int[] correctAns, Answer[] possibleAns)
{
questionText = question;
correctAnswers = correctAns;
possibleAnswers = possibleAns;
}
// All questions have the same number of possible answers
// private static int numberOfAnswers = 4;
private int[] correctAnswers;
private string questionText;
private Answer[] possibleAnswers;
public int[] getCorrectAnswers()
{
return correctAnswers;
@@ -23,4 +86,15 @@ public class Question
{
return questionText;
}
public Answer[] getPossibleAnswers()
{
return possibleAnswers;
}
/*
public static int getNumberOfAnswers()
{
return numberOfAnswers;
}*/
}