Smoother cursor, Viewport scale, Stats
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cdeww5uc20038"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c42ny2e8vbhhc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ccydu80643k4s" path="res://Scripts/CursorScript.gd" id="1_uu6xs"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0hckoql2xnbq" path="res://Textures/svg/Cursor.svg" id="2_r0du0"]
|
||||
@@ -20,7 +20,8 @@ func _process(delta: float) -> void:
|
||||
mouse_velocity = current_mouse_pos - old_mouse_pos
|
||||
|
||||
if mouse_velocity.length_squared()>0.1:
|
||||
rotation = mouse_velocity.angle()
|
||||
rotation = lerp_angle(rotation, mouse_velocity.angle(), 80 * delta)
|
||||
|
||||
|
||||
var direction_to_mouse = (current_mouse_pos - global_position).normalized()
|
||||
global_position = current_mouse_pos
|
||||
|
||||
@@ -11,5 +11,12 @@ config_version=5
|
||||
[application]
|
||||
|
||||
config/name="2D-Beatsaber-ig"
|
||||
run/main_scene="uid://dc02h0h7ooucv"
|
||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
window/vsync/vsync_mode=0
|
||||
|
||||
40
game/testGround.tscn
Normal file
40
game/testGround.tscn
Normal file
@@ -0,0 +1,40 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dc02h0h7ooucv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://hfccs84dimkv" path="res://test_ground.gd" id="1_85h15"]
|
||||
[ext_resource type="PackedScene" uid="uid://c42ny2e8vbhhc" path="res://Cursor.tscn" id="1_rkps0"]
|
||||
|
||||
[node name="Screen" type="CanvasLayer"]
|
||||
script = ExtResource("1_85h15")
|
||||
|
||||
[node name="Cursor" parent="." instance=ExtResource("1_rkps0")]
|
||||
position = Vector2(263, 291)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -131.0
|
||||
offset_right = 134.0
|
||||
grow_vertical = 0
|
||||
size_flags_vertical = 8
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Info?"
|
||||
|
||||
[node name="Fps" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "FPS : "
|
||||
|
||||
[node name="Frametime" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "FrameTimeMCS :"
|
||||
|
||||
[node name="PT" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Procces Time: "
|
||||
|
||||
[node name="VideoMemory" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Video Mem:"
|
||||
15
game/test_ground.gd
Normal file
15
game/test_ground.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
extends CanvasLayer
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
$VBoxContainer/Fps.text = "FPS: " + str(Performance.get_monitor(Performance.TIME_FPS))
|
||||
$VBoxContainer/Frametime.text = "FrameTime: " + str(Engine.get_physics_interpolation_fraction())
|
||||
$VBoxContainer/PT.text = "Process time: "+ str(Performance.get_monitor(Performance.TIME_PROCESS))
|
||||
$VBoxContainer/VideoMemory.text ="Video memory Used: " + str(Performance.get_monitor(Performance.RENDER_VIDEO_MEM_USED))
|
||||
pass
|
||||
1
game/test_ground.gd.uid
Normal file
1
game/test_ground.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://hfccs84dimkv
|
||||
Reference in New Issue
Block a user