GetSyllable() public méthode

public GetSyllable ( int id ) : Syllable,
id int
Résultat Syllable,
    public void UpdateSymbol()
    {
        Sign s = databaseManager.GetSign(ID);

        if (s == null)
        {
            SetSyllables(null, null, null);
            Image1.color = Color.clear;
            Image2.color = Color.clear;
            Image3.color = Color.clear;
            isMade       = false;
        }
        else if (s.SyllableSequence.Count == 2)
        {
            Syllable s1 = databaseManager.GetSyllable(s.SyllableSequence[0]);
            Syllable s2 = databaseManager.GetSyllable(s.SyllableSequence[1]);
            SetSyllables(s1.ImageName, s2.ImageName);
            transform.parent.GetComponent <Image>().color = new Color32(94, 40, 40, 106);
            isMade = true;
        }
        else if (s.SyllableSequence.Count == 3)
        {
            Syllable s1 = databaseManager.GetSyllable(s.SyllableSequence[0]);
            Syllable s2 = databaseManager.GetSyllable(s.SyllableSequence[1]);
            Syllable s3 = databaseManager.GetSyllable(s.SyllableSequence[2]);
            SetSyllables(s1.ImageName, s2.ImageName, s3.ImageName);
            transform.parent.GetComponent <Image>().color = new Color32(94, 40, 40, 106);
            isMade = true;
        }
    }
    // Use this for initialization
    void Start()
    {
        db = GameObject.Find("DatabaseManager").GetComponent <DatabaseManager>();
        GameObject.Find("Image0").GetComponent <Image>().sprite = db.GetImage(db.GetSyllable(0).ImageName);
        GameObject.Find("Image1").GetComponent <Image>().sprite = db.GetImage(db.GetSyllable(1).ImageName);
        GameObject.Find("Image2").GetComponent <Image>().sprite = db.GetImage(db.GetSyllable(2).ImageName);
        GameObject.Find("Image3").GetComponent <Image>().sprite = db.GetImage(db.GetSyllable(3).ImageName);


        List <int> list1 = new List <int>();

        list1.Add(1);
        list1.Add(2);
        list1.Add(3);

        List <int> list2 = new List <int>();

        list2.Add(3);
        list2.Add(1);
        list2.Add(2);


        List <int> list3 = new List <int>();

        list3.Add(3);
        list3.Add(2);
        list3.Add(1);


        //var t1 = db.GetSentenceBySeq(list1);
        //var t2 = db.GetSentenceBySeq(list2);
        //var t3 = db.GetSentenceBySeq(list3);

        //if(t1 == -1 && t2 == -1 && t3 == -1)
        //{

        //}


        var uu = db.GetSign(0);

        if (uu == null)
        {
        }
    }
 void InitializeSyllable()
 {
     db = GameObject.FindGameObjectWithTag(Constants.Tags.DatabaseManager).GetComponent<DatabaseManager>();
     am = GameObject.FindGameObjectWithTag(Constants.Tags.AudioManager).GetComponent<AudioManager>();
     //uic = GameObject.FindObjectOfType<UiController>().GetComponent<UiController>();
     //if (ID == 48)
     //{
     //    return;
     //}
     GetComponent<Image>().sprite = db.GetImage(db.GetSyllable(ID).ImageName);
     //GetComponent<Image>().transform.localScale = new Vector3(1.2f,1.2f,1.2f);
 }
Exemple #4
0
 void InitializeSyllable()
 {
     db = GameObject.FindGameObjectWithTag(Constants.Tags.DatabaseManager).GetComponent <DatabaseManager>();
     am = GameObject.FindGameObjectWithTag(Constants.Tags.AudioManager).GetComponent <AudioManager>();
     //uic = GameObject.FindObjectOfType<UiController>().GetComponent<UiController>();
     //if (ID == 48)
     //{
     //    return;
     //}
     GetComponent <Image>().sprite = db.GetImage(db.GetSyllable(ID).ImageName);
     //GetComponent<Image>().transform.localScale = new Vector3(1.2f,1.2f,1.2f);
 }
    // Use this for initialization
    void Start()
    {
        db = GameObject.Find("DatabaseManager").GetComponent<DatabaseManager>();
        GameObject.Find("Image0").GetComponent<Image>().sprite = db.GetImage(db.GetSyllable(0).ImageName);
        GameObject.Find("Image1").GetComponent<Image>().sprite = db.GetImage(db.GetSyllable(1).ImageName);
        GameObject.Find("Image2").GetComponent<Image>().sprite = db.GetImage(db.GetSyllable(2).ImageName);
        GameObject.Find("Image3").GetComponent<Image>().sprite = db.GetImage(db.GetSyllable(3).ImageName);

        List<int> list1 = new List<int>();
        list1.Add(1);
        list1.Add(2);
        list1.Add(3);

        List<int> list2 = new List<int>();
        list2.Add(3);
        list2.Add(1);
        list2.Add(2);

        List<int> list3 = new List<int>();
        list3.Add(3);
        list3.Add(2);
        list3.Add(1);

        //var t1 = db.GetSentenceBySeq(list1);
        //var t2 = db.GetSentenceBySeq(list2);
        //var t3 = db.GetSentenceBySeq(list3);

        //if(t1 == -1 && t2 == -1 && t3 == -1)
        //{

        //}

        var uu = db.GetSign(0);

        if(uu == null)
        {

        }
    }