Skip to content

Commit

Permalink
Merge pull request #215 from NancokPS2/projectile
Browse files Browse the repository at this point in the history
Projectile implementation + Ranger character class
  • Loading branch information
jonathaneeckhout authored Jan 11, 2024
2 parents 929078c + 429bb73 commit 5e082e0
Show file tree
Hide file tree
Showing 31 changed files with 903 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dqmf8mhfpqgkm"
path="res://.godot/imported/TrapPlaceHolder.png-7b03ce575e23319867447acbe2d375d8.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/items/TrapPlaceholder/scaled/TrapPlaceHolder.png"
dest_files=["res://.godot/imported/TrapPlaceHolder.png-7b03ce575e23319867447acbe2d375d8.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
Binary file added assets/images/particles/MiniPuff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/images/particles/MiniPuff.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bmhwkrtajgg1k"
path="res://.godot/imported/MiniPuff.png-bcc816849c549091e06d711c08039252.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/particles/MiniPuff.png"
dest_files=["res://.godot/imported/MiniPuff.png-bcc816849c549091e06d711c08039252.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
Binary file modified assets/images/projectile/basicarrow/BasicArrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/projectile/scaled/BasicArrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/images/projectile/scaled/BasicArrow.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://c26si4u8ogkgu"
path="res://.godot/imported/BasicArrow.png-102086913196a53cbac5820f06501a3b.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/projectile/scaled/BasicArrow.png"
dest_files=["res://.godot/imported/BasicArrow.png-102086913196a53cbac5820f06501a3b.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
Binary file added assets/images/projectile/scaled/MidArrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/images/projectile/scaled/MidArrow.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bkv4fp6hnsfrg"
path="res://.godot/imported/MidArrow.png-43ad52771b2216f53c89b5406fcca171.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/projectile/scaled/MidArrow.png"
dest_files=["res://.godot/imported/MidArrow.png-43ad52771b2216f53c89b5406fcca171.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
Binary file added assets/images/projectile/scaled/ProArrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/images/projectile/scaled/ProArrow.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://q8y5e6lh8ab"
path="res://.godot/imported/ProArrow.png-c6a87b804927af523e1df3e668a65e43.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/images/projectile/scaled/ProArrow.png"
dest_files=["res://.godot/imported/ProArrow.png-c6a87b804927af523e1df3e668a65e43.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
1 change: 1 addition & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ locale/translations=PackedStringArray("res://assets/translation/en_US.en.transla
2d_physics/layer_4="NPCs"
2d_physics/layer_5="Items"
2d_physics/layer_6="Networking"
2d_physics/layer_7="Projectiles"

[rendering]

Expand Down
6 changes: 5 additions & 1 deletion scenes/player/Player.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=52 format=3 uid="uid://cycpseafpexil"]
[gd_scene load_steps=53 format=3 uid="uid://cycpseafpexil"]

[ext_resource type="Script" path="res://scenes/player/Player.gd" id="1_yw2vn"]
[ext_resource type="PackedScene" uid="uid://c8cji8g03ayyx" path="res://scripts/components/networking/statssynchronizercomponent/StatsSynchronizerComponent.tscn" id="2_p6rt0"]
Expand Down Expand Up @@ -32,6 +32,7 @@
[ext_resource type="Texture2D" uid="uid://bhjm6d6tf1jmt" path="res://assets/images/player/base/scaled/base_handback.png" id="20_26vwi"]
[ext_resource type="Texture2D" uid="uid://b6cxuf50u0nbt" path="res://assets/images/player/base/scaled/base_legback.png" id="21_1v54o"]
[ext_resource type="PackedScene" uid="uid://cjkhsifuk2une" path="res://scripts/components/networking/statuseffectcomponent/StatusEffectComponent.tscn" id="21_04yxn"]
[ext_resource type="PackedScene" uid="uid://d120xwg2n4n23" path="res://scripts/components/networking/projectilesynchronizercomponent/ProjectileSynchronizerComponent.tscn" id="21_thnvb"]
[ext_resource type="Texture2D" uid="uid://buuqjbcf13d1a" path="res://assets/images/player/base/scaled/base_leg.png" id="22_s6iqk"]
[ext_resource type="Texture2D" uid="uid://dmhy5hm831ys4" path="res://assets/images/player/base/scaled/base_trunk.png" id="23_cciaf"]
[ext_resource type="Script" path="res://scenes/player/player_gui.gd" id="23_h5xag"]
Expand Down Expand Up @@ -1855,6 +1856,9 @@ stats_synchronizer = NodePath("../StatsSynchronizerComponent")
[node name="CursorComponent" parent="." node_paths=PackedStringArray("player_synchronizer") instance=ExtResource("17_u25e0")]
player_synchronizer = NodePath("../PlayerSynchronizer")

[node name="ProjectileSynchronizerComponent" parent="." node_paths=PackedStringArray("watcher_component") instance=ExtResource("21_thnvb")]
watcher_component = NodePath("../WatcherSynchronizerComponent")

[node name="StatusEffectComponent" parent="." node_paths=PackedStringArray("user", "stats_component") instance=ExtResource("21_04yxn")]
user = NodePath("..")
stats_component = NodePath("../StatsSynchronizerComponent")
Expand Down
6 changes: 6 additions & 0 deletions scenes/projectiles/DebugArrow.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://d2fuxt0j3owol"]

[ext_resource type="Script" path="res://scripts/components/networking/projectilesynchronizercomponent/Projectile2D.gd" id="1_luqoo"]

[node name="DebugArrow" type="Node2D"]
script = ExtResource("1_luqoo")
24 changes: 24 additions & 0 deletions scenes/projectiles/collision_scenes/Puff.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[gd_scene load_steps=3 format=3 uid="uid://cloh3hx8jfl61"]

[ext_resource type="Texture2D" uid="uid://bmhwkrtajgg1k" path="res://assets/images/particles/MiniPuff.png" id="1_kyxro"]

[sub_resource type="Gradient" id="Gradient_gglau"]
offsets = PackedFloat32Array(0, 0.58, 1)
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)

[node name="Puff" type="CPUParticles2D"]
emitting = false
amount = 4
one_shot = true
explosiveness = 1.0
texture = ExtResource("1_kyxro")
direction = Vector2(0, 0)
spread = 180.0
gravity = Vector2(0, 0)
initial_velocity_min = 30.0
initial_velocity_max = 60.0
angle_min = -720.0
angle_max = 720.0
scale_amount_min = 0.3
scale_amount_max = 0.6
color_ramp = SubResource("Gradient_gglau")
Loading

0 comments on commit 5e082e0

Please sign in to comment.