Пример #1
0
    /********  PROTECTED        ************************/

    /********  PRIVATE          ************************/

    private void showNormalBubble(ONEBubbleTheme.Theme p_theme)
    {
        m_instanceBubble = Instantiate(m_bubble, transform);
        if (m_instanceBubble)
        {
            GameObject contain = m_instanceBubble.transform.Find("containe").gameObject;
            contain.GetComponent <SpriteRenderer>().sprite = p_theme.themeImage;
        }
    }
Пример #2
0
    private void generateOtherList()
    {
        int i = 0;

        while (i < m_nbOtherTheme)
        {
            ONEBubbleTheme.Theme seletedTheme = ONEBubbleTheme.Instance.getRandomNormalTheme();
            if (!newVictime.LovedThemes.Exists(x => x.themeName == seletedTheme.themeName))
            {
                newVictime.addOtherTheme(seletedTheme);
                i++;
            }
        }
    }
Пример #3
0
    // Update is called once per frame
    private void Update()
    {
        if (isInDiscution)
        {
            if (Time.time > m_timerBubble)
            {
                Destroy(m_instanceBubble);
                m_timerBubble = Time.time + m_vitesseBubble;
                ONEBubbleTheme.Theme theme = getRandomTheme();
                showNormalBubble(theme);
                m_indexCurrentBubble++;
            }
            if (m_indexCurrentBubble >= m_maxBubble)
            {
                isInDiscution = false;
                Debug.Log(m_answer > 0);
                ONEPartieIManager.Instance.sendAnswer((m_answer >= 0));

                //Reinitialize answer
                m_answer = 0.0f;
            }
        }
    }
Пример #4
0
 public void addOtherTheme(ONEBubbleTheme.Theme p_theme)
 {
     m_otherThemes.Add(p_theme);
 }
Пример #5
0
 public void addTopTheme(ONEBubbleTheme.Theme p_theme)
 {
     m_top = p_theme;
     m_lovedThemes.Add(p_theme);
 }
Пример #6
0
 public void addHatTheme(ONEBubbleTheme.Theme p_theme)
 {
     m_hat = p_theme;
     m_lovedThemes.Add(p_theme);
 }