示例#1
0
    // 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;
        }
    }
示例#2
0
 void OnDestroy()
 {
     EarthBehaviour.EnableColliderOnDataPointEvent -= EnableCollider;
     applyArrowTextureEvent -= ApplyArrowTexture;
 }