Example #1
0
 public Block(int _number, Utility.PrimaryType _type, bool _mir)
 {
     m_number  = _number;
     m_type    = _type;
     m_inverse = _type == Utility.PrimaryType.Inv;
     m_mirror  = _mir;
 }
    public void initialise(int _number, Utility.PrimaryType _type, bool _inverse, int _index = 0)
    {
        m_label [_index] = "MG" + m_mode + "-" + _type + "-" + _number.ToString("D2");

        isDisposing = false;
        isPlaying   = false;
        //Debug.Log ("label is " + m_label);
        if (m_label.Count == m_gaf.Count)
        {
            animateIdle();
        }
    }
Example #3
0
    public override Quiz generateQuiz(int _lv)
    {
        if (!GameInformationMaster.Instance.lvMasterData.ContainsKey(_lv.ToString()))
        {
            return(null);
        }
        m_lv = _lv.ToString();
        m_rollInformation = null;
        Quiz _quiz = new Mini1Quiz();
        int  ter   = randomTertiaryType();

        for (int i = 0; i < ter; i++)
        {
            Line _line = new Line();
            Utility.PrimaryType[] pri = new Utility.PrimaryType[2];
            pri[0] = randomPrimaryType();
            pri[1] = pri[0];
            bool mul = randomMultipleType();
            if (mul)
            {
                pri [1] = randomPrimaryType();
            }

            for (int j = 0; j < 2; j++)
            {
                int  no  = Random.Range(0, 13);
                bool duo = randomDuoType();
                bool mir = false;

                if (duo)
                {
                    int no2 = Random.Range(0, no + 1);
                    no -= no2;
                    mir = randomMirrorType();
                    Block _block2 = new Block(no2, pri [j], mir);
                    _line.addBlock(_block2, j);
                }

                mir = randomMirrorType();
                Block _block = new Block(no, pri [j], mir);
                _line.addBlock(_block, j);
            }
            ((Mini1Quiz)_quiz).addLine(_line);
        }
        return(_quiz);
    }