= 60.0 if is_night: time_left = int(110.0 - cycle_time) time_str = f"Morning in: {time_left}s" else: time_left = int(60.0 - cycle_time) time_str = f"Night in: {time_left}s" if is_night and len(zombies) == 0: for _ in range(2): zombies.append({ "pos": [player_pos[0] + random.randint(-350, 350), player_pos[1] + random.randint(-350, 350)], "hp": 40, "speed": 2.0 }) elif not is_night and len(zombies) > 0: zombies.clear() m_up = m_down = m_left = m_right = False # --- ОБРАБОТКА СОБЫТИЙ --- for event in pygame.event.get(): if event.type == pygame.QUIT: running = False elif event.type == pygame.MOUSEBUTTONDOWN: pos = event.pos # Если открыт инвентарь — обр - @im200beach"/> = 60.0 if is_night: time_left = int(110.0 - cycle_time) time_str = f"Morning in: {time_left}s" else: time_left = int(60.0 - cycle_time) time_str = f"Night in: {time_left}s" if is_night and len(zombies) == 0: for _ in range(2): zombies.append({ "pos": [player_pos[0] + random.randint(-350, 350), player_pos[1] + random.randint(-350, 350)], "hp": 40, "speed": 2.0 }) elif not is_night and len(zombies) > 0: zombies.clear() m_up = m_down = m_left = m_right = False # --- ОБРАБОТКА СОБЫТИЙ --- for event in pygame.event.get(): if event.type == pygame.QUIT: running = False elif event.type == pygame.MOUSEBUTTONDOWN: pos = event.pos # Если открыт инвентарь — обр - @im200beach - Tikwm"/> = 60.0 if is_night: time_left = int(110.0 - cycle_time) time_str = f"Morning in: {time_left}s" else: time_left = int(60.0 - cycle_time) time_str = f"Night in: {time_left}s" if is_night and len(zombies) == 0: for _ in range(2): zombies.append({ "pos": [player_pos[0] + random.randint(-350, 350), player_pos[1] + random.randint(-350, 350)], "hp": 40, "speed": 2.0 }) elif not is_night and len(zombies) > 0: zombies.clear() m_up = m_down = m_left = m_right = False # --- ОБРАБОТКА СОБЫТИЙ --- for event in pygame.event.get(): if event.type == pygame.QUIT: running = False elif event.type == pygame.MOUSEBUTTONDOWN: pos = event.pos # Если открыт инвентарь — обр - @im200beach"/>

@im200beach: ####### import pygame import sys import random import math # Инициализация Pygame pygame.init() WIDTH, HEIGHT = 800, 600 screen = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption("Mini Rust Ultimate Mobile Edition") clock = pygame.time.Clock() # Большой мир WORLD_W, WORLD_H = 1600, 1200 # Шрифты font = pygame.font.SysFont(None, 22) big_font = pygame.font.SysFont(None, 26) # Игрок player_pos = [WORLD_W // 2, WORLD_H // 2] player_speed = 4.5 player_radius = 18 player_hp = 100 is_jumping = False jump_offset = 0 last_dir = [0, 1] # Инвентарь inventory = { "wood": 0, "food": 2, "water": 2, "medkit": 1, "bow": False, "rifle": False } active_weapon = "fists" # "fists", "bow", "rifle" inventory_open = False # Деревья trees = [] for _ in range(45): trees.append(pygame.Rect(random.randint(50, WORLD_W - 50), random.randint(50, WORLD_H - 50), 35, 35)) # Стены walls = [] # Сундуки chests = [] for _ in range(3): chests.append({ "rect": pygame.Rect(random.randint(100, WORLD_W - 100), random.randint(100, WORLD_H - 100), 40, 40), "opened": False, "loot": random.choice(["bow", "rifle", "medkit", "food", "water"]) }) # Зомби и таймер zombies = [] game_timer = 0.0 projectiles = [] # --- УПРАВЛЕНИЕ В САМОМ НИЗУ ЭКРАНА --- # Левый джойстик (прижато к левому нижнему углу) dpad_x, dpad_y = 10, HEIGHT - 220 btn_w = 68 up_rect = pygame.Rect(dpad_x + btn_w, dpad_y, btn_w, btn_w) left_rect = pygame.Rect(dpad_x, dpad_y + btn_w, btn_w, btn_w) jump_rect = pygame.Rect(dpad_x + btn_w, dpad_y + btn_w, btn_w, btn_w) right_rect = pygame.Rect(dpad_x + btn_w * 2, dpad_y + btn_w, btn_w, btn_w) down_rect = pygame.Rect(dpad_x + btn_w, dpad_y + btn_w * 2, btn_w, btn_w) # Правые кнопки действий (прижаты к правому нижнему углу) act_w, act_h = 135, 42 btn_shoot = pygame.Rect(WIDTH - 145, HEIGHT - 48, act_w, act_h) btn_loot = pygame.Rect(WIDTH - 145, HEIGHT - 94, act_w, act_h) btn_build = pygame.Rect(WIDTH - 145, HEIGHT - 140, act_w, act_h) btn_gather = pygame.Rect(WIDTH - 145, HEIGHT - 186, act_w, act_h) btn_inv = pygame.Rect(WIDTH - 145, HEIGHT - 232, act_w, act_h) # Кнопка инвентаря # Кнопки внутри окна инвентаря inv_panel_rect = pygame.Rect(WIDTH // 2 - 180, HEIGHT // 2 - 170, 360, 340) btn_use_med = pygame.Rect(inv_panel_rect.x + 20, inv_panel_rect.y + 70, 320, 35) btn_use_food = pygame.Rect(inv_panel_rect.x + 20, inv_panel_rect.y + 115, 320, 35) btn_use_water = pygame.Rect(inv_panel_rect.x + 20, inv_panel_rect.y + 160, 320, 35) btn_sel_fists = pygame.Rect(inv_panel_rect.x + 20, inv_panel_rect.y + 215, 100, 35) btn_sel_bow = pygame.Rect(inv_panel_rect.x + 130, inv_panel_rect.y + 215, 100, 35) btn_sel_rifle = pygame.Rect(inv_panel_rect.x + 240, inv_panel_rect.y + 215, 100, 35) btn_close_inv = pygame.Rect(inv_panel_rect.x + 100, inv_panel_rect.y + 280, 160, 40) # Игровой цикл running = True while running: dt = clock.tick(60) / 1000.0 game_timer += dt # Таймер дня и ночи (60 сек день, 50 сек ночи) cycle_time = game_timer % 110.0 is_night = cycle_time >= 60.0 if is_night: time_left = int(110.0 - cycle_time) time_str = f"Morning in: {time_left}s" else: time_left = int(60.0 - cycle_time) time_str = f"Night in: {time_left}s" if is_night and len(zombies) == 0: for _ in range(2): zombies.append({ "pos": [player_pos[0] + random.randint(-350, 350), player_pos[1] + random.randint(-350, 350)], "hp": 40, "speed": 2.0 }) elif not is_night and len(zombies) > 0: zombies.clear() m_up = m_down = m_left = m_right = False # --- ОБРАБОТКА СОБЫТИЙ --- for event in pygame.event.get(): if event.type == pygame.QUIT: running = False elif event.type == pygame.MOUSEBUTTONDOWN: pos = event.pos # Если открыт инвентарь — обр

𝐒𝐤𝐚𝐫_
𝐒𝐤𝐚𝐫_
Open In TikTok:
Region: KZ
Monday 19 October 2026 07:35:33 GMT
47
2
0
0

Music

Download

Comments

There are no more comments for this video.
To see more videos from user @im200beach, please go to the Tikwm homepage.

Other Videos


About