Skip to content

Commit 5b5b8ef

Browse files
authored
Merge pull request #5 from endlessm/units-and-tweaks
Units and tweaks
2 parents 99a9193 + f7a0e9e commit 5b5b8ef

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

components/enemy/enemy.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class_name Enemy
22
extends CharacterBody2D
33

44
## How fast does your enemy move?
5-
@export_range(0, 1000, 10) var speed: float = 100.0:
5+
@export_range(0, 1000, 10, "suffix:px/s") var speed: float = 100.0:
66
set = _set_speed
77

88
## Does the enemy fall off edges?

components/platform/platform.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const TILE_WIDTH: int = 128
66
const SPRITE: Texture2D = preload("res://assets/tiles-a.png")
77

88
## How many tiles wide is the platform?
9-
@export_range(1, 20, 1) var width: int = 3:
9+
@export_range(1, 20, 1, "suffix:tiles") var width: int = 3:
1010
set = _set_width
1111

1212
## Can you jump through the bottom of the platform?

scripts/player.gd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ extends CharacterBody2D
66
set = _set_sprite_frames
77

88
## How fast does your character move?
9-
@export_range(0, 1000, 10) var speed: float = 500.0:
9+
@export_range(0, 1000, 10, "suffix:px/s") var speed: float = 500.0:
1010
set = _set_speed
1111

1212
## How high does your character jump? Note that the gravity will
1313
## be influenced by the [member GameLogic.gravity].
14-
@export_range(-1000, 1000, 10) var jump_velocity = -880.0
14+
@export_range(-1000, 1000, 10, "suffix:px/s") var jump_velocity = -880.0
1515

1616
# Get the gravity from the project settings to be synced with RigidBody nodes.
1717
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
@@ -93,6 +93,7 @@ func _physics_process(delta):
9393

9494
func reset():
9595
position = original_position
96+
velocity = Vector2.ZERO
9697

9798

9899
func _on_lives_changed():

scripts/rules_goals/game_logic.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extends Node
2626
@export_group("Challenges")
2727
## You lose if this time runs out.
2828
## If zero (default), there won't be a time limit to win.
29-
@export_range(0, 60, 0.9, "or_greater") var time_limit: int = 0
29+
@export_range(0, 60, 0.9, "or_greater", "suffix:s") var time_limit: int = 0
3030

3131
## How many lives does the player have?
3232
@export_range(1, 9) var lives: int = 3:

0 commit comments

Comments
 (0)