// 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(); }
private void Apply(RoundCreated ev) { var data = ev.Data as RoundData; _ctx_model.Tournament_Id = ev.Id; _ctx_model.Id = data.Id; _ctx_model.Count = data.Count; }
private void Apply(RoundCreated ev) { var data = ev.Data as RoundData; var round = new TournamentQueryContextModel.Round(); round.Id = data.Id; round.Count = data.Count; _ctx_model.Rounds.Add(round); }
// 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(); }