shield sprite
This commit is contained in:
BIN
growth/assets/animations/Shield_animations/Shield up.png
Normal file
BIN
growth/assets/animations/Shield_animations/Shield up.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c45wkn2k85clo"
|
||||
path="res://.godot/imported/Shield up.png-80113db99ad5afa8303b99e08d69704c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/animations/Shield_animations/Shield up.png"
|
||||
dest_files=["res://.godot/imported/Shield up.png-80113db99ad5afa8303b99e08d69704c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
growth/assets/animations/Shield_animations/Spawn_despawn 1.png
Normal file
BIN
growth/assets/animations/Shield_animations/Spawn_despawn 1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bsp5t48l7356k"
|
||||
path="res://.godot/imported/Spawn_despawn 1.png-8288d0722e693e6cb26fa48cc3464b27.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/animations/Shield_animations/Spawn_despawn 1.png"
|
||||
dest_files=["res://.godot/imported/Spawn_despawn 1.png-8288d0722e693e6cb26fa48cc3464b27.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
growth/assets/animations/Shield_animations/dpawn_desparn 2.png
Normal file
BIN
growth/assets/animations/Shield_animations/dpawn_desparn 2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bnqrlq14jwuud"
|
||||
path="res://.godot/imported/dpawn_desparn 2.png-7a79c4dcc20ac2bcd7ba55fb79acc905.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/animations/Shield_animations/dpawn_desparn 2.png"
|
||||
dest_files=["res://.godot/imported/dpawn_desparn 2.png-7a79c4dcc20ac2bcd7ba55fb79acc905.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -149,6 +149,7 @@ func shuffle_deck():
|
||||
drawpile.shuffle();
|
||||
# active_card_index = 0;
|
||||
get_node(player).shield_active = true;
|
||||
get_node(player).get_node("Shield").visible = true;
|
||||
highlight_card(active_card_index)
|
||||
|
||||
func get_cards() -> Array:
|
||||
|
||||
@@ -114,6 +114,7 @@ func take_hit(_damage, knockback_vector, knockback_strength = 1):
|
||||
move_state = MoveState.Knockback;
|
||||
velocity = knockback_vector;
|
||||
knockback_timer.start(0.2 * knockback_strength);
|
||||
$Shield.visible = false;
|
||||
else:
|
||||
reboot();
|
||||
|
||||
@@ -124,4 +125,5 @@ func reboot():
|
||||
velocity = Vector2.ZERO;
|
||||
move_state = MoveState.Still;
|
||||
shield_active = true;
|
||||
$Shield.visible = true;
|
||||
# hand.discard_all();
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dhhnr3xkxbxlu"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dhhnr3xkxbxlu"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b6lfgkrbmr8ee" path="res://player.gd" id="1_4flbx"]
|
||||
[ext_resource type="AudioStream" uid="uid://b4g7622b8mxeg" path="res://assets/sfx/damage_taken.wav" id="2_i3pqv"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcvpult8xfit6" path="res://assets/icons/Nortoff_logo.png" id="2_onrkg"]
|
||||
[ext_resource type="Texture2D" uid="uid://c45wkn2k85clo" path="res://assets/animations/Shield_animations/Shield up.png" id="4_hqtel"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_onrkg"]
|
||||
animations = [{
|
||||
@@ -15,6 +16,17 @@ animations = [{
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_sweqy"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("4_hqtel")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_i3pqv"]
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
@@ -33,6 +45,11 @@ unique_name_in_owner = true
|
||||
scale = Vector2(0.1, 0.1)
|
||||
sprite_frames = SubResource("SpriteFrames_onrkg")
|
||||
|
||||
[node name="Shield" type="AnimatedSprite2D" parent="."]
|
||||
scale = Vector2(0.3, 0.3)
|
||||
sprite_frames = SubResource("SpriteFrames_sweqy")
|
||||
frame_progress = 0.8800269
|
||||
|
||||
[node name="Hurtbox" type="CollisionShape2D" parent="."]
|
||||
scale = Vector2(2.5, 2.5)
|
||||
shape = SubResource("CircleShape2D_i3pqv")
|
||||
|
||||
Reference in New Issue
Block a user