diff options
Diffstat (limited to 'assets/weapons/goo_gun')
-rw-r--r-- | assets/weapons/goo_gun/Bullet.gd | 10 | ||||
-rw-r--r-- | assets/weapons/goo_gun/Bullet.tscn | 26 | ||||
-rw-r--r-- | assets/weapons/goo_gun/GooGun.gd | 31 | ||||
-rw-r--r-- | assets/weapons/goo_gun/GooGun.tscn | 50 | ||||
-rw-r--r-- | assets/weapons/goo_gun/gun_material.tres | 4 | ||||
-rw-r--r-- | assets/weapons/goo_gun/tank_material.tres | 4 |
6 files changed, 0 insertions, 125 deletions
diff --git a/assets/weapons/goo_gun/Bullet.gd b/assets/weapons/goo_gun/Bullet.gd deleted file mode 100644 index 5c5097f..0000000 --- a/assets/weapons/goo_gun/Bullet.gd +++ /dev/null @@ -1,10 +0,0 @@ -extends RigidBody - -export var material : Material = null - -func _ready(): - if material != null: - $MeshInstance.set("material/0", material) - -func _on_Bullet_body_entered(_body): - queue_free() diff --git a/assets/weapons/goo_gun/Bullet.tscn b/assets/weapons/goo_gun/Bullet.tscn deleted file mode 100644 index 69ba3b6..0000000 --- a/assets/weapons/goo_gun/Bullet.tscn +++ /dev/null @@ -1,26 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://assets/characters/base_character/friendly_material.tres" type="Material" id=1] -[ext_resource path="res://assets/weapons/goo_gun/Bullet.gd" type="Script" id=2] - -[sub_resource type="SphereMesh" id=1] -material = ExtResource( 1 ) - -[sub_resource type="SphereShape" id=2] - -[node name="Bullet" type="RigidBody"] -transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0 ) -gravity_scale = 5.0 -contacts_reported = 1 -contact_monitor = true -linear_damp = 2.0 -script = ExtResource( 2 ) - -[node name="MeshInstance" type="MeshInstance" parent="."] -mesh = SubResource( 1 ) -material/0 = null - -[node name="CollisionShape" type="CollisionShape" parent="."] -shape = SubResource( 2 ) - -[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"] diff --git a/assets/weapons/goo_gun/GooGun.gd b/assets/weapons/goo_gun/GooGun.gd deleted file mode 100644 index 8ee6e0f..0000000 --- a/assets/weapons/goo_gun/GooGun.gd +++ /dev/null @@ -1,31 +0,0 @@ -extends Spatial - -export var is_firing = false -export var fire_rate = 0.075 -export var projectile_material : Material = null -export var projectile_spread = 0 #TODO -export var projectile_scalar = 40 -export var look_angle = 0 -export var weapon_pitch = 0 - -var time_since_fire = 0 - -var Bullet = preload("res://assets/weapons/goo_gun/Bullet.tscn") - -func _physics_process(delta): - if is_firing: - time_since_fire += delta - if time_since_fire >= fire_rate: - time_since_fire -= fire_rate - do_fire_projectile() - else: - time_since_fire = fire_rate - -func do_fire_projectile(): - var bullet = Bullet.instance() - bullet.material = projectile_material - $Nozzle.add_child(bullet) - bullet.set_as_toplevel(true) - var shoot_direction = Vector3.FORWARD.rotated(Vector3.LEFT, weapon_pitch) - shoot_direction = shoot_direction.rotated(Vector3.UP, look_angle) - bullet.apply_central_impulse(shoot_direction.normalized() * projectile_scalar) diff --git a/assets/weapons/goo_gun/GooGun.tscn b/assets/weapons/goo_gun/GooGun.tscn deleted file mode 100644 index 4bd8c65..0000000 --- a/assets/weapons/goo_gun/GooGun.tscn +++ /dev/null @@ -1,50 +0,0 @@ -[gd_scene load_steps=8 format=2] - -[ext_resource path="res://assets/weapons/goo_gun/gun_material.tres" type="Material" id=1] -[ext_resource path="res://assets/weapons/goo_gun/tank_material.tres" type="Material" id=2] -[ext_resource path="res://assets/weapons/goo_gun/GooGun.gd" type="Script" id=3] - -[sub_resource type="CubeMesh" id=1] -material = ExtResource( 1 ) -size = Vector3( 0.25, 0.25, 2 ) - -[sub_resource type="CapsuleMesh" id=2] -material = ExtResource( 2 ) -radius = 0.275 -mid_height = 0.618 - -[sub_resource type="CubeMesh" id=3] -material = ExtResource( 1 ) -size = Vector3( 0.15, 0.5, 0.15 ) - -[sub_resource type="CylinderMesh" id=4] -material = ExtResource( 1 ) -top_radius = 0.24 -bottom_radius = 0.088 -height = 0.429 - -[node name="GooGun" type="Spatial"] -script = ExtResource( 3 ) - -[node name="Body" type="MeshInstance" parent="."] -use_in_baked_light = true -mesh = SubResource( 1 ) -material/0 = null - -[node name="Tank" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.398, -0.375 ) -use_in_baked_light = true -mesh = SubResource( 2 ) -material/0 = null - -[node name="Handle" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.373, -0.27 ) -use_in_baked_light = true -mesh = SubResource( 3 ) -material/0 = null - -[node name="Nozzle" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0.953 ) -use_in_baked_light = true -mesh = SubResource( 4 ) -material/0 = null diff --git a/assets/weapons/goo_gun/gun_material.tres b/assets/weapons/goo_gun/gun_material.tres deleted file mode 100644 index 08bf630..0000000 --- a/assets/weapons/goo_gun/gun_material.tres +++ /dev/null @@ -1,4 +0,0 @@ -[gd_resource type="SpatialMaterial" format=2] - -[resource] -albedo_color = Color( 0.317647, 1, 0.14902, 1 ) diff --git a/assets/weapons/goo_gun/tank_material.tres b/assets/weapons/goo_gun/tank_material.tres deleted file mode 100644 index c8b98a4..0000000 --- a/assets/weapons/goo_gun/tank_material.tres +++ /dev/null @@ -1,4 +0,0 @@ -[gd_resource type="SpatialMaterial" format=2] - -[resource] -albedo_color = Color( 1, 0.423529, 0.0509804, 1 ) |