void Start() { m_instance = this; // Set cursor texture StartCoroutine(SetCustomCursor()); // Populate array pool of text animations m_hit_effects = new EffectManager[EFFECT_POOL_SIZE]; for (int idx = 0; idx < EFFECT_POOL_SIZE; idx++) { m_hit_effects[idx] = Instantiate(m_hit_effect_prefab) as EffectManager; } }
void Start () { m_instance = this; // Set cursor texture StartCoroutine(SetCustomCursor()); // Populate array pool of text animations m_hit_effects = new EffectManager[EFFECT_POOL_SIZE]; for(int idx=0; idx < EFFECT_POOL_SIZE; idx++) { m_hit_effects[idx] = Instantiate(m_hit_effect_prefab) as EffectManager; } }
void OnMouseOver() { if (!m_activated) { m_mesh.colors = new Color[] { m_tint_colour, m_tint_colour, m_tint_colour, m_tint_colour } } ; } void OnMouseExit() { if (!m_activated) { m_mesh.colors = new Color[] { Color.clear, Color.clear, Color.clear, Color.clear } } ; } void Reset() { m_activated = false; m_mesh.colors = new Color[] { Color.clear, Color.clear, Color.clear, Color.clear }; SetupRandomColour(); } void OnMouseDown() { if (!m_activated) { m_mesh.colors = new Color[] { m_active_colour, m_active_colour, m_active_colour, m_active_colour }; RuntimeDynamicSceneManager.TargetHit(m_transform.position, m_colour); m_activated = true; } } } }