Skip to content

Commit 856660f

Browse files
authored
Integrate powerup asset (#2120)
This is a ball of thread animated, for the grappling hook. Use it in both the grapple ability and the longer thread modifier. Merge the Aseprite file provided by PixelFrog with the existing one, because we still need a default powerup asset. Also keep the shadow, which wasn't in the delivered files. Also desaturate the highlight sprite provided, because modulate the highlight is an easy way to distinguish the powerups. Finally, export multiple layers: - A shadow layer - The highlight effect - The powerup asset itself Change the powerup scene accordingly. Remove the shader used before for highlighting. Resolve #2121
1 parent 0739571 commit 856660f

21 files changed

Lines changed: 249 additions & 74 deletions

scenes/game_elements/characters/player/components/unify_abilities_test.tscn

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
[ext_resource type="Script" uid="uid://cp54mgi54nywo" path="res://scenes/game_logic/fill_game_logic.gd" id="17_b7aom"]
1717
[ext_resource type="PackedScene" uid="uid://dmevaymmt6wco" path="res://scenes/game_elements/props/powerup/powerup.tscn" id="17_w66m4"]
1818
[ext_resource type="PackedScene" uid="uid://b82nsrh332syj" path="res://scenes/game_elements/characters/enemies/throwing_enemy/throwing_enemy.tscn" id="18_iu48k"]
19+
[ext_resource type="SpriteFrames" uid="uid://cfgahyntmtfgu" path="res://scenes/game_elements/props/powerup/components/powerup_thread.tres" id="18_mecxj"]
20+
[ext_resource type="SpriteFrames" uid="uid://cualgrcaaggcm" path="res://scenes/game_elements/props/powerup/components/powerup_default.tres" id="18_nev3j"]
1921
[ext_resource type="PackedScene" uid="uid://y8ha8abfyap2" path="res://scenes/game_elements/props/filling_barrel/filling_barrel.tscn" id="19_a36ca"]
2022

2123
[node name="Testeo" type="Node2D" unique_id=80760666]
@@ -91,13 +93,15 @@ color = Color(0, 1, 1, 1)
9193

9294
[node name="RepelPowerup" parent="OnTheGround" unique_id=1795462717 instance=ExtResource("17_w66m4")]
9395
position = Vector2(-307, 1622)
96+
sprite_frames = ExtResource("18_nev3j")
9497
highlight_color = Color(0, 0.4392157, 1, 1)
9598

9699
[node name="GrapplePowerup" parent="OnTheGround" unique_id=1564118198 instance=ExtResource("17_w66m4")]
97100
position = Vector2(-307, 1770)
98101
ability = 16
99102
ability_name = "Grapple"
100103
interact_action = "Collect Grapple"
104+
sprite_frames = ExtResource("18_mecxj")
101105
highlight_color = Color(0.8910073, 0.7227245, 0, 1)
102106

103107
[node name="ScreenOverlay" type="CanvasLayer" parent="." unique_id=1976326993]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:85521554f47d1985edb2fa23d6e55702f4f909b28564985522f73ac2cb2cdf9b
3-
size 955
2+
oid sha256:55b8c510d4c250334084d142d892b006c7b3b62d80a5057e8cdc9482676132a9
3+
size 21580

scenes/game_elements/props/powerup/components/powerup.gd

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ signal collected
2121
set = _set_interact_action
2222

2323
## Asset of this powerup.
24-
@export var sprite_frames: SpriteFrames:
24+
@export var sprite_frames: SpriteFrames = preload("uid://cualgrcaaggcm"):
2525
set = _set_sprite_frames
2626

27-
## The powerup shines with this color through a shader.
27+
## The powerup shines with this color.
2828
@export var highlight_color: Color = Color.WHITE:
2929
set = _set_highlight_color
3030

@@ -34,7 +34,7 @@ signal collected
3434
var _tween: Tween
3535

3636
@onready var interact_area: InteractArea = %InteractArea
37-
@onready var highlight_effect: Sprite2D = %HighlightEffect
37+
@onready var highlight_effect: AnimatedSprite2D = %HighlightEffect
3838
@onready var sprite: AnimatedSprite2D = %Sprite
3939
@onready var interact_collision: CollisionShape2D = %InteractCollision
4040
@onready var ground_collision: CollisionShape2D = %GroundCollision
@@ -99,7 +99,6 @@ func _on_interact_area_interaction_started(
9999
_tween.kill()
100100
_tween = create_tween()
101101
_tween.tween_property(highlight_effect, "modulate", Color.WHITE, 0.5)
102-
_tween.tween_property(highlight_effect, "material:shader_parameter/width", 1.0, 1.0)
103102
await _tween.finished
104103
if dialogue:
105104
DialogueManager.show_dialogue_balloon(dialogue, "", [self])
@@ -113,5 +112,5 @@ func _on_interact_area_observers_changed() -> void:
113112
if _tween:
114113
_tween.kill()
115114
_tween = create_tween()
116-
var width: float = 0.8 if interact_area.is_being_observed else 0.4
117-
_tween.tween_property(highlight_effect, "material:shader_parameter/width", width, 1.0)
115+
var color: Color = Color.WHITE if interact_area.is_being_observed else highlight_color
116+
_tween.tween_property(highlight_effect, "modulate", color, 0.5)

scenes/game_elements/props/powerup/components/powerup.png

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://drfvwiaeco2b1"
6+
path="res://.godot/imported/powerup_default.png-552e42b7860b171ba67b0c2747fd11f3.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://scenes/game_elements/props/powerup/components/powerup_default.png"
14+
dest_files=["res://.godot/imported/powerup_default.png-552e42b7860b171ba67b0c2747fd11f3.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/uastc_level=0
22+
compress/rdo_quality_loss=0.0
23+
compress/hdr_compression=1
24+
compress/normal_map=0
25+
compress/channel_pack=0
26+
mipmaps/generate=false
27+
mipmaps/limit=-1
28+
roughness/mode=0
29+
roughness/src_normal=""
30+
process/channel_remap/red=0
31+
process/channel_remap/green=1
32+
process/channel_remap/blue=2
33+
process/channel_remap/alpha=3
34+
process/fix_alpha_border=true
35+
process/premult_alpha=false
36+
process/normal_map_invert_y=false
37+
process/hdr_as_srgb=false
38+
process/hdr_clamp_exposure=false
39+
process/size_limit=0
40+
detect_3d/compress_to=1
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[gd_resource type="SpriteFrames" format=3 uid="uid://cualgrcaaggcm"]
2+
3+
[ext_resource type="Texture2D" uid="uid://drfvwiaeco2b1" path="res://scenes/game_elements/props/powerup/components/powerup_default.png" id="1_cyg7p"]
4+
5+
[resource]
6+
animations = [{
7+
"frames": [{
8+
"duration": 1.0,
9+
"texture": ExtResource("1_cyg7p")
10+
}],
11+
"loop": true,
12+
"name": &"default",
13+
"speed": 10.0
14+
}]
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

scenes/game_elements/props/powerup/components/powerup.png.import renamed to scenes/game_elements/props/powerup/components/powerup_shadow.png.import

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
importer="texture"
44
type="CompressedTexture2D"
5-
uid="uid://dr1cdu5ien6jq"
6-
path="res://.godot/imported/powerup.png-a4ee45e73209b83508bc25ff7865937f.ctex"
5+
uid="uid://dhsw4tbjtoa46"
6+
path="res://.godot/imported/powerup_shadow.png-fc59d6f1ed68daaa632d29c5b80396fc.ctex"
77
metadata={
88
"vram_texture": false
99
}
1010

1111
[deps]
1212

13-
source_file="res://scenes/game_elements/props/powerup/components/powerup.png"
14-
dest_files=["res://.godot/imported/powerup.png-a4ee45e73209b83508bc25ff7865937f.ctex"]
13+
source_file="res://scenes/game_elements/props/powerup/components/powerup_shadow.png"
14+
dest_files=["res://.godot/imported/powerup_shadow.png-fc59d6f1ed68daaa632d29c5b80396fc.ctex"]
1515

1616
[params]
1717

0 commit comments

Comments
 (0)