private void Awake() { if (direction < 0 || direction >= 4) { Debug.Log("The direction is an invalid number, please fix. -KB"); } if (transform.parent != null) { tileManager = transform.parent.gameObject.GetComponent <PassageTileManager>(); } }
// Use this for initialization void Start() { PassageTileManager upPtm = ptm.PlaceNewTile(0).GetComponentInChildren <PassageTileManager>(); upPtm.PlaceNewTile(1); upPtm.PlaceNewTile(3); ptm.PlaceNewTile(1); PassageTileManager downPtm = ptm.PlaceNewTile(2).GetComponentInChildren <PassageTileManager>(); downPtm.PlaceNewTile(1); downPtm.PlaceNewTile(3); ptm.PlaceNewTile(3); }