public void StartRisk(OverlayColumn riskColumn) { overlaysController = GameObject.Find("GameUI").GetComponent(typeof(OverlaysController)) as OverlaysController; this.riskColumn = riskColumn; building = gameObject.GetComponent(typeof(Building)) as Building; StartCoroutine("UpdateRisk"); }
public virtual void OnPlace(Tile[] parentTiles) { if (placed) { return; } placed = true; this.parentTiles = parentTiles; SetParentTags(); UseRandomRotation(); MoveToLayer(transform, gameObject.layer); // make sure children are on same layer overlaysController = GameObject.Find("GameUI").GetComponent(typeof(OverlaysController)) as OverlaysController; audioSource = GetComponent<AudioSource>(); InitializeRisks(); InitializeTile(); PlayPlaceSound(); }
void Start() { overlaysController = GameObject.Find("GameUI").GetComponent <OverlaysController>(); }