Exemple #1
0
    public void SetState(StarSevenState state)
    {
        this.state       = state;
        this.cachedState = state;

        switch (state)
        {
        case StarSevenState.OFF:
            star.SetActive(false);
            seven.SetActive(false);
            break;

        case StarSevenState.STAR:
            star.SetActive(true);
            seven.SetActive(false);
            break;

        case StarSevenState.SEVEN:
            star.SetActive(false);
            seven.SetActive(true);
            break;

        case StarSevenState.SEVENSTAR:
            star.SetActive(true);
            seven.SetActive(true);
            break;
        }
    }
Exemple #2
0
 void Start()
 {
     cachedState = state;
     SetState(state);
 }