Skip to content

Instantly share code, notes, and snippets.

extends KinematicBody2D
var move_speed := 400
var jump_force := 600
var gravity := 1200
var max_jump_times := 1
var jump_times := 0
var grounded := false
var velocity := Vector2.ZERO
extends KinematicBody2D
var input_vector: Vector2
var velocity: Vector2
export var max_speed := 300
export var acceleration := 500
export var friction := 1000
func _physics_process(delta):
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
namespace GameName
{
public class GameLoop : Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
class Player
{
Texture2D texture;
public Vector2 position;
Vector2 velocity = Vector2.Zero;
int speed = 300;
int acceleration = 600;
int friction = 1000;
public Player(Texture2D _texture, Vector2 _position)
import math
import random
import matplotlib.pyplot as plt
#scrie o functie care calculeaza aria si circumerenta unui cerc
# print pi * r^2 2 * pi * r
# def calc(r):
# circ = 2 * math.pi * r
# aria = math.pi * r * r