public IJsonObject GetJsonObject() { var cherry = new JsonCherry(); cherry.State = state; cherry.TimeForNextState = secondForNextState; cherry.Score = score; return cherry; }
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); }