Exemplo n.º 1
0
    public void StartPregame()
    {
        Pregame?.Invoke();

        if (IsServer)
        {
            GameState.MatchStateValue = EMatchState.PREGAME;
            StartCoroutine(PregameTimer());
        }
    }
Exemplo n.º 2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Pregame = await _context.Pregame.FirstOrDefaultAsync(m => m.ID == id);

            if (Pregame == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Exemplo n.º 3
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Pregame = await _context.Pregame.FindAsync(id);

            if (Pregame != null)
            {
                _context.Pregame.Remove(Pregame);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }