conforms file names to consistant standard
This commit is contained in:
26
projectiles/bomb/scn_bomb.tscn
Normal file
26
projectiles/bomb/scn_bomb.tscn
Normal file
@@ -0,0 +1,26 @@
|
||||
[gd_scene format=3 uid="uid://c8oq5unisjqne"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://7f4dfphgiswr" path="res://scenes/projectiles/explosive_projectile.tscn" id="1_kf2wi"]
|
||||
[ext_resource type="Script" uid="uid://cue37hfrlm61m" path="res://projectiles/bomb/scr_bomb.gd" id="2_qvo4u"]
|
||||
[ext_resource type="Texture2D" uid="uid://b54d5dc4jmlau" path="res://projectiles/bomb/tex_bomb.png" id="3_ilhep"]
|
||||
[ext_resource type="AudioStream" uid="uid://dknygn5eyuhxt" path="res://audio/aud_shot.wav" id="4_uh8y6"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_bbpul"]
|
||||
bounce = 0.6
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_sy5qq"]
|
||||
random_pitch = 1.1
|
||||
streams_count = 1
|
||||
stream_0/stream = ExtResource("4_uh8y6")
|
||||
|
||||
[node name="Bomb" unique_id=1211608304 instance=ExtResource("1_kf2wi")]
|
||||
physics_material_override = SubResource("PhysicsMaterial_bbpul")
|
||||
gravity_scale = 1.0
|
||||
script = ExtResource("2_qvo4u")
|
||||
|
||||
[node name="Sprite3D" parent="." index="1"]
|
||||
pixel_size = 0.015
|
||||
texture = ExtResource("3_ilhep")
|
||||
|
||||
[node name="AudioStreamPlayer" parent="." index="2"]
|
||||
stream = SubResource("AudioStreamRandomizer_sy5qq")
|
||||
20
projectiles/bomb/scr_bomb.gd
Normal file
20
projectiles/bomb/scr_bomb.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
class_name BombProjectile
|
||||
extends ExplosiveProjectile
|
||||
|
||||
var max_bounces: int = 1
|
||||
var bounces: int = 0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
apply_central_impulse(direction.normalized() * force)
|
||||
#print(direction.length())
|
||||
#print(force)
|
||||
if owner_id == 0:
|
||||
max_bounces = 0
|
||||
|
||||
|
||||
func _on_body_entered(_body: Node) -> void:
|
||||
bounces += 1
|
||||
var collided_body: bool = get_colliding_bodies()[0].get_collision_layer_value(3)
|
||||
if bounces > max_bounces or collided_body:
|
||||
explode()
|
||||
1
projectiles/bomb/scr_bomb.gd.uid
Normal file
1
projectiles/bomb/scr_bomb.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cue37hfrlm61m
|
||||
BIN
projectiles/bomb/tex_bomb.png
Normal file
BIN
projectiles/bomb/tex_bomb.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 799 B |
40
projectiles/bomb/tex_bomb.png.import
Normal file
40
projectiles/bomb/tex_bomb.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b54d5dc4jmlau"
|
||||
path="res://.godot/imported/tex_bomb.png-48b2c05a029fa0e98d3c33e4f37362ec.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://projectiles/bomb/tex_bomb.png"
|
||||
dest_files=["res://.godot/imported/tex_bomb.png-48b2c05a029fa0e98d3c33e4f37362ec.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=true
|
||||
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=0
|
||||
Reference in New Issue
Block a user