Example #1
0
        /// <Summary>
        /// Set object references to cache them.
        /// </Summary>
        void SetObjRef()
        {
            gameController = GameObject.FindGameObjectWithTag("GameController");
            mapSettings    = gameController.GetComponent <MapShowingSettings>();

            mapObj    = GameObject.Find("MapBase");
            mapRt     = mapObj.GetComponent <RectTransform>();
            pointerRt = gameObject.GetComponent <RectTransform>();
        }
Example #2
0
 /// <Summary>
 /// Get settings about map from the MapShowingSettings component.
 /// </Summary>
 void GetMapSettings()
 {
     if (gameController == null)
     {
         gameController = GameObject.FindGameObjectWithTag("GameController");
     }
     if (mapSettings == null)
     {
         mapSettings = gameController.GetComponent <MapShowingSettings>();
     }
     this.showLengthHorizontal = mapSettings.showLengthHorizontal;
     this.showLengthVertical   = mapSettings.showLengthVertical;
     this.drawSmoothness       = mapSettings.smoothness;
 }