示例#1
0
    public void EndGame(Config.GameMode gamemode)
    {
        hud.Deactivate();

        endmenu.setMode(gamemode, hud.getScores());
        endmenu.m_active = true;
    }
示例#2
0
    public GameIntel(float game_duration, int game_mode, bool[] power_ups, int nb_players, int nb_cpus, bool authorize_reconnection, bool disable_perspective_change, string map_name, string server_ip = "127.0.0.1")
    {
        this.game_duration = game_duration;
        this.game_mode     = (Config.GameMode)game_mode;

        this.powers_str = "";

        List <Config.PowerType> powers = new List <Config.PowerType>();

        for (int i = 0, len = power_ups.Length; i < len; i++)
        {
            if (power_ups[i])
            {
                powers.Add((Config.PowerType)i);
                this.powers_str += Config.power_ups_string[i] + ", ";
            }
        }

        this.power_ups = powers.ToArray();

        this.nb_players           = nb_players;
        this.nb_cpus              = nb_cpus;
        this.auth_reco            = authorize_reconnection;
        this.disable_persp_change = disable_perspective_change;
        this.map_name             = map_name;
        this.server_ip            = server_ip;
    }
示例#3
0
 public static void HandleEndGame(Packet p)
 {
     if (current.Both)
     {
         return;
     }
     Config.GameMode gamemode = (Config.GameMode)p.ReadInt();
     GameMgr.Instance.EndGame(gamemode);
 }
示例#4
0
 public void setMode(Config.GameMode gamemode, int[] scores)
 {
     this.gamemode = gamemode;
     this.scores   = scores;
 }