Exemplo n.º 1
0
        private static void DeveloperGUI()
        {
            //Header
            int x = (int)(ScreenX * 0.01);
            int y = (int)(ScreenY * 0.8);

            Text entsHeader = new Text("Active Game-Related Entities", new PointF(x, y), 0.3f);

            entsHeader.Color = Color.FromArgb(255, 255, 255, 255);
            entsHeader.Draw();

            Dictionary <int, GameEntity> gameEnts = Arenas.GetGameEntities();

            foreach (KeyValuePair <int, GameEntity> entry in gameEnts)
            {
                y += (int)(ScreenY * 0.03);
                textWithShadow($"[{entry.Value.ID}] = {entry.Key}, {entry.Value.Amount}", new PointF(x, y), Color.FromArgb(255, 120, 120, 120), 0.2f);
            }

            // Cash
            x = (int)(ScreenX * 0.25);
            y = (int)(ScreenY * 1.35);

            textWithShadow($"$ {User.Cash}", new PointF(x, y), Color.FromArgb(255, 120, 255, 120), 0.2f);

            //Timeleft
            x = (int)(ScreenX * 0.8);
            y = (int)(ScreenY * 1.35);

            TimeSpan time = TimeSpan.FromSeconds(GameRules.Time);

            textWithShadow($"Timeleft: {time.ToString(@"mm\:ss")}", new PointF(x, y), Color.FromArgb(255, 255, 255, 255), 0.3f);
        }
Exemplo n.º 2
0
        // Privates
        private static void tickGameActive()
        {
            if (User.IsDead() || User.Team == Util.Teams.TEAM_POLICE)
            {
                return;
            }

            Dictionary <int, GameEntity> entities = Arenas.GetGameEntities();

            foreach (KeyValuePair <int, GameEntity> entry in entities)
            {
                if (NetworkDoesNetworkIdExist(entry.Key))
                {
                    int  entID  = NetworkGetEntityFromNetworkId(entry.Key);
                    bool exists = (entID > 0 && DoesEntityExist(entID));
                    if (exists)
                    {
                        string id = entities[entry.Key].ID;
                        GameEntities.HandleEntities(id, entID);
                    }
                }
            }
        }
Exemplo n.º 3
0
 public static ArenaData GetArenaInfo()
 {
     return(Arenas.getArenaData(ArenaID));
 }