# импорт библиотеки с указанием алиаса (псевдонима - короткое имя)
import turtle as t # as t
# далее можно использовать
t.forward(n)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerController : MonoBehaviour | |
{ | |
private CharacterController controller; | |
private int speed = 10; | |
private int currentLine = 1; | |
private float lineDistance = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local player = game.Players.LocalPlayer | |
local runService = game:GetService('RunService') | |
local camera = workspace.CurrentCamera | |
-- Переменная для хранения текущего соединения с RenderStep | |
local cameraConnection | |
-- Функция для настройки камеры | |
local function setupCamera(character) | |
local root = character:WaitForChild('HumanoidRootPart') -- Ждем появления HumanoidRootPart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
import pygame | |
# Инициализация pygame | |
pygame.init() | |
def call_menu(sr, fps): | |
""" | |
Функция отображения главного меню игры |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame as pg | |
# ===== КОНСТАНТЫ ДЛЯ ОТРИСОВКИ СОБАКИ ===== | |
SCREEN_WIDTH = 900 # Ширина игрового окна | |
SCREEN_HEIGHT = 550 # Высота игрового окна | |
DOG_WIDTH = 310 # Ширина изображения собаки | |
DOG_HEIGHT = 500 # Высота изображения собаки | |
DOG_Y = 100 # Y-координата для отрисовки собаки на главном экране | |
MENU_NAV_YPAD = 130 # Отступ от нижнего края для позиционирования в мини-игре |