/******** 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; } }
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++; } } }
// 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; } } }
public void addOtherTheme(ONEBubbleTheme.Theme p_theme) { m_otherThemes.Add(p_theme); }
public void addTopTheme(ONEBubbleTheme.Theme p_theme) { m_top = p_theme; m_lovedThemes.Add(p_theme); }
public void addHatTheme(ONEBubbleTheme.Theme p_theme) { m_hat = p_theme; m_lovedThemes.Add(p_theme); }