This file contains 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 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 |
This file contains 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
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) |
This file contains 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 Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Graphics; | |
using Microsoft.Xna.Framework.Input; | |
namespace GameName | |
{ | |
public class GameLoop : Game | |
{ | |
GraphicsDeviceManager graphics; | |
SpriteBatch spriteBatch; |
This file contains 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
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): |
This file contains 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
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 |