Exemple #1
0
	public void ShowRiskOverlay(Risks riskType)
    {
        if (riskType == Risks.None) {
            riskColumn.Hide();
			riskColumn.UpdateHeight(0.01f);
        }
	}
Exemple #2
0
 public void ShowRiskOverlay(Risks riskType)
 {
     if (riskEnum != riskType)
     {
         return;
     }
     riskColumn.UpdateHeight(currentRiskValue / maxRiskValue);
     riskColumn.Show();
 }
Exemple #3
0
    public virtual void InitializeRisks()
    {
        Risk[] risks = GetComponents<Risk>();
        if (risks.Length == 0) {
            return;
        }

        overlayColumn = (GameObject)AssetDatabase.LoadAssetAtPath(PATH_TO_OVERLAY_COLUMN, typeof(GameObject));
        riskColumn = Instantiate(overlayColumn, transform.position, Quaternion.Euler(270, 0, 0), transform).GetComponent(typeof(OverlayColumn)) as OverlayColumn;

        riskColumn.Hide();
        riskColumn.UpdateHeight(0.01f);

        foreach (Risk risk in risks) {
            risk.StartRisk(riskColumn);
        }
    }