Compare commits

...

4 commits

Author SHA1 Message Date
762da40eec create game icon 2025-11-23 05:44:15 -03:00
014797238c implement speed mult 2025-11-23 05:36:50 -03:00
12093b4234 create code regions 2025-11-23 05:34:54 -03:00
a446efbac0 remove unused next state vaiable 2025-11-23 05:32:40 -03:00
9 changed files with 32 additions and 16 deletions

BIN
icon.aseprite Normal file

Binary file not shown.

20
icon.aseprite.import Normal file
View file

@ -0,0 +1,20 @@
[remap]
importer="aseprite_wizard.plugin.static-texture"
type="PortableCompressedTexture2D"
uid="uid://bjl6s2jwlml2l"
path="res://.godot/imported/icon.aseprite-a1a480d170088a07ce74affa6a3cf6cd.res"
[deps]
source_file="res://icon.aseprite"
dest_files=["res://.godot/imported/icon.aseprite-a1a480d170088a07ce74affa6a3cf6cd.res"]
[params]
layer/exclude_layers_pattern=""
layer/only_visible_layers=false
first_frame_only=true
sheet/sheet_type="packed"
sheet/sheet_columns=12
sheet/scale=1

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

View file

@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://bvoovx45nadxj" uid="uid://4aq8ekc6sruc"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://icon.svg" source_file="res://icon.png"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
[params] [params]
@ -38,6 +38,3 @@ process/hdr_as_srgb=false
process/hdr_clamp_exposure=false process/hdr_clamp_exposure=false
process/size_limit=0 process/size_limit=0
detect_3d/compress_to=1 detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

Before

Width:  |  Height:  |  Size: 995 B

View file

@ -12,7 +12,7 @@ config_version=5
config/name="girl will never sing again" config/name="girl will never sing again"
config/features=PackedStringArray("4.5", "GL Compatibility") config/features=PackedStringArray("4.5", "GL Compatibility")
config/icon="res://icon.svg" config/icon="uid://4aq8ekc6sruc"
[debug] [debug]

View file

@ -11,6 +11,8 @@ const DEADZONE = 0.1
var h_press_tick: int = 0 ## last time horizontal axis was pressed var h_press_tick: int = 0 ## last time horizontal axis was pressed
var v_press_tick: int = 0 ## last time vertical axis was pressed var v_press_tick: int = 0 ## last time vertical axis was pressed
var speed_mult: float = 1.0
func _input(event: InputEvent) -> void: func _input(event: InputEvent) -> void:
if event.is_action_pressed("move_left") or event.is_action_pressed("move_right"): if event.is_action_pressed("move_left") or event.is_action_pressed("move_right"):

View file

@ -1,9 +1,6 @@
extends PlayerState extends PlayerState
var next_state: StringName
func _enter(_previous_state_path: String, _data: Dictionary[StringName, Variant] = {}) -> void: func _enter(_previous_state_path: String, _data: Dictionary[StringName, Variant] = {}) -> void:
print('entering idle') print('entering idle')
player.velocity = Vector2.ZERO player.velocity = Vector2.ZERO

View file

@ -1,24 +1,25 @@
extends PlayerState extends PlayerState
var next_state: StringName
func _enter(_previous_state_path: String, _data: Dictionary = {}) -> void: func _enter(_previous_state_path: String, _data: Dictionary = {}) -> void:
print("entering walking") print("entering walking")
player.move_and_slide() player.move_and_slide()
func _state_physics_update(_delta: float) -> void: func _state_physics_update(_delta: float) -> void:
#region player physics
var direction: Vector2 = player.get_movement_vector() var direction: Vector2 = player.get_movement_vector()
direction = direction.normalized() direction = direction.normalized()
player.velocity = direction * player.max_speed player.velocity = direction * player.max_speed * player.speed_mult
player.move_and_slide() player.move_and_slide()
#endregion
if watch_state([WALKING]): return if watch_state([WALKING]): return
#region player animation
if direction.y > 0: player.sprite.play("walk_down") if direction.y > 0: player.sprite.play("walk_down")
elif direction.y < 0: player.sprite.play("walk_up") elif direction.y < 0: player.sprite.play("walk_up")
elif direction.x > 0: player.sprite.play("walk_right") elif direction.x > 0: player.sprite.play("walk_right")
elif direction.x < 0: player.sprite.play("walk_left") elif direction.x < 0: player.sprite.play("walk_left")
#endregion