//constructor
 public Question(Form form, Form bigMessageBox, GlobalStore gs, GlobalStore specialDataStore, QuestionManager qm)
 {
     this.form = form;
     this.bigMessageBox = bigMessageBox;
     this.PageSeen = false;
     this.gs= gs;
     this.specialDataStore = specialDataStore;
     this.qm = qm;
     processedData = null;
 }
        //constructor
        public QuestionTextDate(Form form, Form bigMessageBox, GlobalStore gs, GlobalStore specialDataStore, QuestionManager qm)
            : base(form, bigMessageBox, gs, specialDataStore, qm)
        {
            //mapping from month as int to month as string
            monthMap = new Dictionary<string, int>();

            for (int i = 0; i <= 12; i++)
            {

                monthMap.Add(months[i], i);

            }
        }
 //constructor
 public QuestionRadioDynamicLabel(Form form, Form bigMessageBox, GlobalStore gs, GlobalStore specialDataStore, QuestionManager qm)
     : base(form, bigMessageBox, gs, specialDataStore, qm)
 {
 }
 //constructor
 public QuestionTextOneCheck(Form form, Form bigMessageBox, GlobalStore gs, GlobalStore specialDataStore, QuestionManager qm)
     : base(form, bigMessageBox, gs, specialDataStore, qm)
 {
 }
 //constructor
 public QuestionSelect(Form form, Form bigMessageBox, GlobalStore gs, GlobalStore specialDataStore, QuestionManager qm)
     : base(form, bigMessageBox, gs, specialDataStore, qm)
 {
     //init the optionslist
     optionList = new List<Option>();
 }
Exemple #6
0
    // Use this for initialization
    void Start()
    {
        buttonText = new Text[4];

        playerAttacks = GameObject.Find ("PlayerAttacks");
        lightBeam = GameObject.Find ("LightBeam");
        combo = GameObject.Find("Combo");
        hpGuage = GameObject.Find("HpGuage");
        panel = GameObject.Find("Panel");

        startButton = GameObject.Find("StartButton");
        startButton.SetActive(false);

        myPv = this.GetComponent<PhotonView>();
        GameManager.instance.Score = 0;

        rtChargeGuage = playerAttacks.transform.GetChild (0).GetComponent<RectTransform> ();
        playerAttacks.SetActive(false);
        lightBeam.SetActive (false);

        questionManager = this.GetComponent<QuestionManager> ();
        questionManager.LoadQuestion (GameManager.instance.SelectLevel);

        questionText = GameObject.Find ("QuestionText").GetComponent<Text> ();
        questionText.text = "みんなの じゅんびが\nできるまで まってね";

        answerText1 = GameObject.Find ("AnswerText1").GetComponent<Text> ();
        answerText2 = GameObject.Find ("AnswerText2").GetComponent<Text> ();
        answerText3 = GameObject.Find ("AnswerText3").GetComponent<Text> ();
        answerText4 = GameObject.Find ("AnswerText4").GetComponent<Text> ();

        answerButtons = new Button[4];
        answerButtons [0] = GameObject.Find ("AnswerButton1").GetComponent<Button> ();
        answerButtons [1] = GameObject.Find ("AnswerButton2").GetComponent<Button> ();
        answerButtons [2] = GameObject.Find ("AnswerButton3").GetComponent<Button> ();
        answerButtons [3] = GameObject.Find ("AnswerButton4").GetComponent<Button> ();

        BUTTON_DEFAULT_COLOR = new Color (255.0f/255, 190.0f/255, 120.0f/255);

        foreach (Button button in answerButtons)
        {
            button.gameObject.SetActive(false);
        }

        questionIndex = 1;
        answerNum = -1;
        remainTurn = 10;
        remainTime = 10.0f;
        isAnswering = false;
        difficulty = GameManager.instance.difficulty;
        difficultyText = GameObject.Find ("DifficultyText").GetComponent<Text>();
        switch (difficulty) {
        case 1:
            difficultyText.text = "レベル\nかんたん";
            break;
        case 2:
            difficultyText.text = "レベル\nふつう";
            break;
        case 3:
            difficultyText.text = "レベル\nむずかしい";
            break;
        default:
            difficultyText.text = "レベル\nかんたん";
            break;
        }

        turnText = GameObject.Find ("TurnText").GetComponent<Text> ();
        turnText.text = "のこり10ターン";
        timeText = GameObject.Find ("TimeText").GetComponent<Text> ();
        timeText.text = "のこり10びょう";

        joinedPlayers = GameObject.Find ("JoinedPlayers");
        joinedPlayerObjectList = new List<GameObject> ();

        for (int i = 0; i < joinedPlayers.transform.childCount; i++) {
            GameObject targetObject = joinedPlayers.transform.GetChild (i).gameObject;
            joinedPlayerObjectList.Add (targetObject);
            targetObject.transform.GetChild(0).gameObject.SetActive(false);
            targetObject.SetActive(false);
        }
        GameManager.instance.Score = 0;

        enemyImage = GameObject.Find ("Enemy").GetComponent<Image>();
        enemyImage.sprite = enemySprites [GameManager.instance.SelectLevel];
    }