// Called on the very first round, for now here the initial elements can be initialized public void CreateInitialRound(IExerciseRoundDataVO dataVo) { _roundData = dataVo as FlashGlanceRoundDataVO; _fieldHeight = _roundData.NumberOfRows; _fieldWidth = _roundData.NumberOfColumns; _gap = Rect.rect.width / _fieldWidth; var tempGap = Rect.rect.height / _fieldHeight; _gap = _gap > tempGap ? tempGap : _gap; _itemSize = _gap * 0.8f; System.Diagnostics.Debug.WriteLine("CreateInitialRound"); foreach (FlashGlanceRoundItemVO item in _roundData.Items) { var newItem = InitItem(item); if (newItem.IsHidden) { newItem.Appear(); } } slider.Init(_roundData); RoundCreated.Dispatch(); //TestAnswer(); }
// This is called every round after the initial one, update the elements here public void CreateRound(IExerciseRoundDataVO dataVo) { FlashGlanceRoundDataVO lastRoundData = _roundData; _roundData = dataVo as FlashGlanceRoundDataVO; System.Diagnostics.Debug.WriteLine("CreateRound"); foreach (FlashGlanceRoundItemVO item in _roundData.Items) { var newItem = InitItem(item); if (newItem.IsHidden) { newItem.Appear(); } } slider.Update(_roundData); RoundCreated.Dispatch(); //TestAnswer(); }