nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::DuelWindow Class Reference

#include <duel_window.h>

Public Member Functions

std::optional< protocol::DuelAction > Build (const protocol::Duel &duel)
 Draws what the duel needs now. Returns the player's answer, once.

Static Public Attributes

static constexpr double kFight = 1.0
 How long Fight! stays up, in seconds, as it fades.
static constexpr double kAnswering = 1.0

Detailed Description

A duel on the screen: a question when someone asks you, with Duel and Not now, the countdown's seconds in the middle of the screen, and Fight! as it starts. Who won goes in the chat, from the server.

Definition at line 18 of file duel_window.h.

Member Function Documentation

◆ Build()

std::optional< protocol::DuelAction > nanommo::DuelWindow::Build ( const protocol::Duel & duel)

Draws what the duel needs now. Returns the player's answer, once.

Definition at line 20 of file duel_window.cc.

Member Data Documentation

◆ kAnswering

double nanommo::DuelWindow::kAnswering = 1.0
staticconstexpr

How long an answer hides the question, in seconds, while the server hears it. If it's still asking after that, as when it turned a yes down, the question's back.

Definition at line 26 of file duel_window.h.

◆ kFight

double nanommo::DuelWindow::kFight = 1.0
staticconstexpr

How long Fight! stays up, in seconds, as it fades.

Definition at line 21 of file duel_window.h.


The documentation for this class was generated from the following files: