private void OnClickFire(GameObject go) { //check // if (!Check(go)) // { // return; // } string name = go.name.Substring(5); int id = 0; if (!int.TryParse(name, out id)) { Debuger.LogWarning("wrong name " + name); return; } //m_BlockBg.SetActive(true); FireworkGameLogicGuide.Instance.Fire("yanhua_" + (id + 1), m_ColorPanel.color); if (go != null) { FireworkEvent fireworkEvent = go.GetComponent <FireworkEvent>(); if (fireworkEvent != null) { fireworkEvent.OnGameObjectClick(); } if (FireworkGuideManager.Instance != null) { if (FireworkGuideManager.Instance.timer > 60) { FireworkGuideManager.Instance.HideExitButtonShowTexture(); } } } }
private void OnDropEnd(GameObject go) { ColorItem selectedItem = null; foreach (var elem in m_ColorList) { if (elem.obj == go) { selectedItem = elem; break; } } selectedItem.obj.SetActive(false); Color res = Color.white; for (int i = 0; i < m_ColorList.Count; ++i) { if (!m_ColorList[i].obj.activeSelf) { res = ColorCombine(res, m_ColorList[i].color); } } //combine color m_ColorPanel.color = res; if (go != null) { FireworkEvent fireworkEvent = go.GetComponent <FireworkEvent>(); if (fireworkEvent != null) { fireworkEvent.OnGameObjectClick(); } if (FireworkGuideManager.Instance != null) { if (FireworkGuideManager.Instance.timer > 60) { FireworkGuideManager.Instance.HideExitButtonShowTexture(); } } } }