rendering fixes and menu
This commit is contained in:
@@ -1 +0,0 @@
|
||||
extends Node
|
||||
6
scripts/autoloads/nodes/event_manager.gd
Normal file
6
scripts/autoloads/nodes/event_manager.gd
Normal file
@@ -0,0 +1,6 @@
|
||||
extends Node
|
||||
|
||||
var player_free: bool = true
|
||||
|
||||
func transition() -> void:
|
||||
pass
|
||||
6
scripts/menus/main_menu.gd
Normal file
6
scripts/menus/main_menu.gd
Normal file
@@ -0,0 +1,6 @@
|
||||
extends Control
|
||||
|
||||
|
||||
|
||||
func _on_start_button_pressed() -> void:
|
||||
pass # Replace with function body.
|
||||
1
scripts/menus/main_menu.gd.uid
Normal file
1
scripts/menus/main_menu.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bfgqkpn60hhwj
|
||||
1
scripts/menus/profile_creator.gd
Normal file
1
scripts/menus/profile_creator.gd
Normal file
@@ -0,0 +1 @@
|
||||
extends Control
|
||||
1
scripts/menus/profile_creator.gd.uid
Normal file
1
scripts/menus/profile_creator.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cs1ylnivyrbc2
|
||||
@@ -1,6 +1,6 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
const SPEED: int = 500
|
||||
const SPEED: int = 800
|
||||
|
||||
@onready var animated_sprite: AnimatedSprite2D = $AnimatedSprite2D
|
||||
@onready var cam: Camera2D = $Camera2D
|
||||
@@ -17,19 +17,20 @@ func _ready() -> void:
|
||||
cam.limit_right = used_tilemap_rect.end.x * tilesize
|
||||
cam.limit_bottom = used_tilemap_rect.end.y * tilesize
|
||||
|
||||
var x_margin: float = float(tilesize) / 4
|
||||
var y_margin: float = float(tilesize) / 2
|
||||
var margin: float = float(tilesize) / 4
|
||||
|
||||
position_limit_rect = Rect2(
|
||||
Vector2(cam.limit_left + x_margin, cam.limit_top + y_margin),
|
||||
Vector2(cam.limit_left + margin, cam.limit_top - margin),
|
||||
Vector2(
|
||||
(cam.limit_right - x_margin) - (cam.limit_left + x_margin),
|
||||
(cam.limit_bottom - y_margin) - (cam.limit_top + y_margin)
|
||||
(cam.limit_right - margin) - (cam.limit_left + margin),
|
||||
(cam.limit_bottom - margin / 2) - (cam.limit_top + margin / 2)
|
||||
)
|
||||
)
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
velocity = Input.get_vector("move_left","move_right","move_up","move_down").normalized() * delta * SPEED * 3
|
||||
if EventManager.player_free:
|
||||
velocity = Input.get_vector("move_left","move_right","move_up","move_down").normalized() * delta * SPEED * 3
|
||||
|
||||
move_and_slide()
|
||||
position = position.clamp(position_limit_rect.position, position_limit_rect.end)
|
||||
|
||||
@@ -45,4 +46,3 @@ func _physics_process(delta: float) -> void:
|
||||
animated_sprite.animation = "down"
|
||||
else:
|
||||
animated_sprite.stop()
|
||||
|
||||
|
||||
6
scripts/resources/profile.gd
Normal file
6
scripts/resources/profile.gd
Normal file
@@ -0,0 +1,6 @@
|
||||
class_name Profile
|
||||
extends Resource
|
||||
|
||||
@export var your_name: String = "Joel"
|
||||
@export var villain_friend_name: String = "Josh"
|
||||
@export var stupid_friend_name: String = "Kevin"
|
||||
1
scripts/resources/profile.gd.uid
Normal file
1
scripts/resources/profile.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://sx081r57538w
|
||||
Reference in New Issue
Block a user