// Start is called before the first frame update public void InitLabel(Data data, StormColorCodeCategory _s) { if (data is Storm) { storm = (Storm)data; stromCategory = _s; string info = "Name : " + storm.name + ", \n " + "Basin : " + storm.basin + ", \n " + "Sub-basin : " + storm.subBasin; EarthBehaviour.EnableColliderOnDataPointEvent += EnableCollider; infoLabel.text = info; QuadMat = Quad.GetComponent <MeshRenderer>().material; DefaultTex = QuadMat.mainTexture; infoLabel.gameObject.SetActive(false); QuadHighlighter.SetActive(false); applyArrowTextureEvent += ApplyArrowTexture; } }
void OnDestroy() { EarthBehaviour.EnableColliderOnDataPointEvent -= EnableCollider; applyArrowTextureEvent -= ApplyArrowTexture; }