Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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();
    }
Esempio n. 3
0
    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();
    }
Esempio n. 4
0
    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();
    }
Esempio n. 5
0
    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();
    }
Esempio n. 6
0
    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++;
    }
Esempio n. 7
0
    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();
    }