Inheritance: MonoBehaviour
Ejemplo n.º 1
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(this);
     }
     else
     {
         instance = this;
         trackers = new ArrayList();
         GameObject game_map_obj = GameObject.FindWithTag("Map");
         Tilemap    game_map     = null;
         if (game_map_obj != null)
         {
             game_map = game_map_obj.GetComponent <Tilemap>();
         }
         if (game_map != null)
         {
             MapSize_x = game_map.cellBounds.size.y;
             MapSize_y = game_map.cellBounds.size.x;
             Debug.Log("Init Globe Bounds: " + MapSize_x + "," + MapSize_y);
         }
     }
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     Current = this;
 }