Browse Source

added character customization to quest manager

galo 2 years ago
parent
commit
18162e5a5e
3 changed files with 59 additions and 3 deletions
  1. 47 0
      Debug.tscn
  2. 6 3
      main.tscn
  3. 6 0
      project.godot

+ 47 - 0
Debug.tscn

@@ -0,0 +1,47 @@
+[gd_scene load_steps=3 format=2]
+
+[ext_resource path="res://font/8bit.tres" type="DynamicFont" id=6]
+
+[sub_resource type="GDScript" id=1]
+script/source = "extends Label
+
+func _input(event):
+	if Input.is_action_just_pressed(\"f3\"): 
+		visible = !visible
+		Engine.set_target_fps(0 if visible else 60)
+
+
+func _physics_process(delta):
+	text = \"fps: \" + str(Engine.get_frames_per_second())
+	text += \"\\n\"
+	text += 'mem: ' + String.humanize_size(OS.get_static_memory_usage())
+	text += \"\\n\"
+	text += 'vram: ' + String.humanize_size(Performance.get_monitor(20))
+	text += \"\\n\"
+#	if has_node(singleton.player_path):
+#		text += 'x: ' + str(int(get_node(singleton.player_path).global_position.x))
+#		text += \"\\n\"
+#		text += 'y: ' + str(int(get_node(singleton.player_path).global_position.y))
+
+"
+
+[node name="Debug" type="CanvasLayer"]
+pause_mode = 2
+layer = 127
+
+[node name="fpscount" type="Label" parent="."]
+pause_mode = 2
+anchor_left = -0.00539021
+anchor_top = 0.260297
+anchor_right = -0.00539021
+anchor_bottom = 0.260297
+margin_left = 11.9259
+margin_top = 188.737
+margin_right = 189.926
+margin_bottom = 309.737
+custom_fonts/font = ExtResource( 6 )
+text = "fps: 60"
+script = SubResource( 1 )
+__meta__ = {
+"_edit_use_anchors_": true
+}

+ 6 - 3
main.tscn

@@ -1,4 +1,4 @@
-[gd_scene load_steps=10 format=2]
+[gd_scene load_steps=11 format=2]
 
 [ext_resource path="res://Client.gd" type="Script" id=1]
 [ext_resource path="res://Server.gd" type="Script" id=2]
@@ -8,6 +8,7 @@
 [ext_resource path="res://spawner.gd" type="Script" id=6]
 [ext_resource path="res://enemiessprite.gd" type="Script" id=7]
 [ext_resource path="res://font/tiny.tres" type="DynamicFont" id=8]
+[ext_resource path="res://Debug.tscn" type="PackedScene" id=9]
 
 [sub_resource type="GDScript" id=1]
 script/source = "extends Node
@@ -46,9 +47,9 @@ script = ExtResource( 1 )
 
 [node name="ping" type="Label" parent="Client"]
 margin_left = 12.1612
-margin_top = 331.474
+margin_top = 260.304
 margin_right = 52.1612
-margin_bottom = 345.474
+margin_bottom = 281.304
 custom_fonts/font = ExtResource( 8 )
 text = "ping..."
 script = ExtResource( 4 )
@@ -64,6 +65,8 @@ script = ExtResource( 5 )
 [node name="enemies" type="Node" parent="Client"]
 script = ExtResource( 7 )
 
+[node name="Debug" parent="Client" instance=ExtResource( 9 )]
+
 [node name="Hud" type="CanvasLayer" parent="Client"]
 
 [node name="HBoxContainer" type="HBoxContainer" parent="Client/Hud"]

+ 6 - 0
project.godot

@@ -25,6 +25,7 @@ window/size/width=640
 window/size/height=360
 window/size/test_width=1280
 window/size/test_height=720
+window/vsync/use_vsync=false
 window/stretch/mode="viewport"
 window/stretch/aspect="keep"
 
@@ -50,6 +51,11 @@ d={
 "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
  ]
 }
+f3={
+"deadzone": 0.5,
+"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777246,"unicode":0,"echo":false,"script":null)
+ ]
+}
 
 [layer_names]