Пример #1
0
 public IJsonObject GetJsonObject()
 {
     var cherry = new JsonCherry();
     cherry.State = state;
     cherry.TimeForNextState = secondForNextState;
     cherry.Score = score;
     return cherry;
 }
Пример #2
0
        public void Initialize(JsonCherry jsonCherry)
        {
            secondForNextState = jsonCherry.TimeForNextState;
            state = jsonCherry.State;
            score = jsonCherry.Score;

            if (state == CherryState.Disable) Hide();
            StartCoroutine(StateChangedCoroutine());
            if (state == CherryState.Pulsation)
                StartCoroutine(Pulsation());

            onCherryAteAgain(score);
        }