GetSign() 공개 메소드

public GetSign ( int id ) : Sign,
id int
리턴 Sign,
예제 #1
0
    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;
        }
    }
예제 #2
0
    IEnumerator FemaleSignPlay(int id)
    {
        if (databaseManager.GetSign(id) != null)
        {
            Sign s = databaseManager.GetSign(id);

            foreach (int i in s.SyllableSequence)
            {
                FemaleSyllabusSoundPlay(i);
                yield return(new WaitForSeconds(FemaleSyllabusList[i].length));
            }
        }
        yield return(new WaitForSeconds(1));
    }
예제 #3
0
 void Update()
 {
     if (databaseManager.GetSign(ID) != null)
     {
         gameObject.SetActive(false);
     }
 }
예제 #4
0
    // 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)
        {
        }
    }
예제 #5
0
    // 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)
        {

        }
    }