void Start() { MapPlacementController.instance = this; GameObject terrain = GameObject.FindWithTag("Terrain"); if (terrain) { Collider co = terrain.GetComponent <Collider>(); this.gameObject.transform.position = new Vector3(co.bounds.size.x / 2, 3.5f, co.bounds.size.z / 2); } lastSaveTime_ = Time.time; this.AllRoutePointMode = false; this.sowRect_ = new Rect(Screen.width - 200, 0, 0, 0); this.tlwRect_ = new Rect(this.sowRect_.xMin - 200, 0, 0, 0); }
void Start() { RenderSettings.fog = false; instance = this; GameObject[] terrains = GameObject.FindGameObjectsWithTag("Terrain"); foreach (GameObject terrain in terrains) { if (terrain) { Collider co = terrain.GetComponent <Collider>(); if (co == null) { continue; } this.gameObject.transform.position = new Vector3(co.bounds.size.x / 2, 3.5f, co.bounds.size.z / 2); break; } } }