public DataPlayerMatch(ItemPlayerPlaying _player) { player = _player.GetPlayer(); timePlayedFirst = _player.GetPlayedTimeFirst(); timePlayedSecond = _player.GetPlayedTimeSecond(); events = _player.GetEvents(); }
private void ButtonAssist(ItemPlayerPlaying _player) { EventMatch em; em.player = _player.GetPlayer(); em.team = null; em.type = EventMatch.MatchEventType.ASSIST; em.time = TimeSpan.FromSeconds(timer); events.Add(em); _player.AddEvent(em); }
private void ButtonFoul(ItemPlayerPlaying _player) { EventMatch em; em.player = _player.GetPlayer(); em.team = null; em.type = EventMatch.MatchEventType.FOUL_ALLY; em.time = TimeSpan.FromSeconds(timer); events.Add(em); _player.AddEvent(em); currentFoulsAlly++; UpdateScoreboard(); }
private void PlayerLeave(ItemPlayerPlaying _player) { EventMatch em; em.player = _player.GetPlayer(); em.team = null; em.type = EventMatch.MatchEventType.LEAVE; em.time = TimeSpan.FromSeconds(timer); events.Add(em); _player.AddEvent(em); active.Remove(_player); _player.transform.SetSiblingIndex(allPlayers.Count - (reds + 1)); _player.Left(); }
private void PlayerJoin(ItemPlayerPlaying _player) { EventMatch em; em.player = _player.GetPlayer(); em.team = null; em.type = EventMatch.MatchEventType.JOIN; em.time = TimeSpan.FromSeconds(timer); events.Add(em); _player.AddEvent(em); active.Add(_player); _player.transform.SetSiblingIndex(active.Count - 1); _player.Joined(); }
private void ButtonGoal(ItemPlayerPlaying _player) { EventMatch em; em.player = _player.GetPlayer(); em.team = ToTeam(active); em.type = EventMatch.MatchEventType.GOAL_ALLY; em.time = TimeSpan.FromSeconds(timer); events.Add(em); _player.AddEvent(em); _player.Goal(); scoreAlly++; UpdateScoreboard(); }
private void ButtonRed(ItemPlayerPlaying _player) { EventMatch em; em.player = _player.GetPlayer(); em.team = null; em.type = EventMatch.MatchEventType.RED; em.time = TimeSpan.FromSeconds(timer); events.Add(em); _player.AddEvent(em); _player.Red(); active.Remove(_player); _player.transform.SetAsLastSibling(); reds++; }
private void ButtonYellow(ItemPlayerPlaying _player) { if (_player.GetYellow()) { ButtonRed(_player); return; } EventMatch em; em.player = _player.GetPlayer(); em.team = null; em.type = EventMatch.MatchEventType.YELLOW; em.time = TimeSpan.FromSeconds(timer); events.Add(em); _player.AddEvent(em); _player.Yellow(); }
public void StartThis(int _event, ItemPlayerPlaying _player) { imageEvent.sprite = spritesEvents[_event]; textPlayer.text = _player.GetPlayer().name; }