Initial commit (1/2)

This commit is contained in:
Алкесей Мирнеков 2023-11-05 16:23:18 +03:00 committed by GitHub
commit 3411c5796d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 2261 additions and 0 deletions

12
scripts/CameraTweaks.gd Normal file
View file

@ -0,0 +1,12 @@
extends Camera2D
@onready var MSEngine = $"../Engine"
var Scale : float = 1
var MinScale = Scale / 1.5
var MaxScale = Scale * 2
func _process(_delta):
var SpeedPercentage = MSEngine.MaxSpeed / MSEngine.Speed
SpeedPercentage = (clamp(SpeedPercentage, MinScale, MaxScale) if MSEngine.Speed >= 0 else MaxScale) if get_parent().AllowShooting else 1
zoom = Vector2(SpeedPercentage, SpeedPercentage)