예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     roadPoolScript     = roadTypeObject.GetComponent <RoadPool>();
     riverPoolScript    = riverTypeObject.GetComponent <RoadPool>();
     treePoolScript     = treeTypeObject.GetComponent <RoadPool>();
     pickRoadTypeScript = this.gameObject.GetComponent <PickRoadType>();
 }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     Debug.Log("in ScenarioMgr Start");
     numTilesInXAxis = Mathf.FloorToInt(10 * gameObject.transform.localScale.x);
     numTilesInZAxis = Mathf.FloorToInt(10 * gameObject.transform.localScale.z);
     scenarioInfo    = new ScenarioData(numTilesInXAxis, numTilesInZAxis);
     uiState         = UIState.Pointer;
     curObject       = null;
     firstDir        = Direction.Undefined;
     tempObjects     = new Dictionary <IntPoint2D, GameObject> ();
     creatingObject  = false;
     deleting        = false;
     roadPool        = gameObject.GetComponent("RoadPool") as RoadPool;
     housePool       = gameObject.GetComponent("HousePool") as HousePool;
     popMgr          = gameObject.GetComponent("PopulationManager") as PopulationManager;
     objMgr          = gameObject.GetComponent("ObjectManager") as ObjectManager;
     tempObjectType  = UIState.Pointer;
     StartCoroutine("SetUpInitRoad");
 }
 void Start()
 {
     startSpawnPosition = new Vector3(30, 0.01f, 0);
     speedCoef          = 0.5f;
     roadPool           = FindObjectOfType <RoadPool>();
 }
예제 #4
0
 private void Awake()
 {
     Instance = this;
 }
예제 #5
0
 void Awake()
 {
     currentInstance    = this;
     pooledRoadSections = new List <GameObject>();
 }