diff --git a/WikiJam/Level/Level.tscn b/WikiJam/Level/Level.tscn index 7b64608..d11eacb 100644 --- a/WikiJam/Level/Level.tscn +++ b/WikiJam/Level/Level.tscn @@ -2,12 +2,12 @@ [ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1] -[sub_resource type="NavigationMesh" id=1] +[sub_resource type="NavigationMesh" id=3] [sub_resource type="BoxShape" id=2] extents = Vector3( 10, 1, 10 ) -[sub_resource type="PlaneMesh" id=3] +[sub_resource type="PlaneMesh" id=4] size = Vector2( 20, 20 ) [node name="Level" type="Spatial"] @@ -18,7 +18,7 @@ size = Vector2( 20, 20 ) editor/display_folded = true [node name="NavigationMeshInstance" type="NavigationMeshInstance" parent="Navigation"] -navmesh = SubResource( 1 ) +navmesh = SubResource( 3 ) [node name="StaticBody" type="StaticBody" parent="Navigation/NavigationMeshInstance"] @@ -27,6 +27,6 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 ) shape = SubResource( 2 ) [node name="MeshInstance" type="MeshInstance" parent="Navigation/NavigationMeshInstance"] -mesh = SubResource( 3 ) +mesh = SubResource( 4 ) skeleton = NodePath("") material/0 = null diff --git a/WikiJam/Player/Footsteps.gd b/WikiJam/Player/Footsteps.gd index 63c8c89..4f7872d 100644 --- a/WikiJam/Player/Footsteps.gd +++ b/WikiJam/Player/Footsteps.gd @@ -7,5 +7,5 @@ onready var steps = [ func play_footstep(): - #Logger.trace("Footstep") + Logger.trace("Footstep") steps[0].play() \ No newline at end of file diff --git a/WikiJam/Player/Player.gd b/WikiJam/Player/Player.gd index 5bb24cb..c26fe15 100644 --- a/WikiJam/Player/Player.gd +++ b/WikiJam/Player/Player.gd @@ -49,13 +49,13 @@ func _ready(): func _physics_process(delta): - process_input() - process_movement(delta) + _process_input() + _process_movement(delta) func _process(_delta): - process_animations() + _process_animations() -func process_input(): +func _process_input(): # Walking var input_movement_vector = Vector2() if Input.is_action_pressed("move_fwrd"): @@ -81,7 +81,7 @@ func process_input(): _is_sprinting = Input.is_action_pressed("move_sprint") -func process_movement(delta): +func _process_movement(delta): _vel.y += delta * GRAVITY # set movement speed @@ -94,7 +94,7 @@ func process_movement(delta): _vel = move_and_slide(_vel, Vector3(0, 1, 0), 0.05, 4, deg2rad(MAX_SLOPE_ANGLE)) -func process_animations(): +func _process_animations(): _animation.playback_speed = _vel.length() / MOVE_SPEED diff --git a/WikiJam/Util/Collector.gd b/WikiJam/Util/Collector.gd new file mode 100644 index 0000000..05cc7e0 --- /dev/null +++ b/WikiJam/Util/Collector.gd @@ -0,0 +1,11 @@ +extends Node + +var _collectibles: Array + + +func addCollectible (coll): + _collectibles.append(coll) + + +func getCount (): + return _collectibles.size() \ No newline at end of file diff --git a/WikiJam/project.godot b/WikiJam/project.godot index b9dfac1..c624f29 100644 --- a/WikiJam/project.godot +++ b/WikiJam/project.godot @@ -57,12 +57,13 @@ _global_script_class_icons={ [application] config/name="WikiJam" -run/main_scene="res://Level/Fortaleza.tscn" +run/main_scene="res://Level/Level.tscn" config/icon="res://icon.png" [autoload] Logger="*res://Util/gs_logger/logger.gd" +Collector="*res://Util/Collector.gd" [input]