Armazon/props/items/item_gun.tscn
2024-01-28 13:44:54 -05:00

55 lines
2.2 KiB
Plaintext

[gd_scene load_steps=9 format=3 uid="uid://cvyn0aqnktraw"]
[ext_resource type="Script" path="res://scripts/packageitem.gd" id="1_863aw"]
[ext_resource type="ArrayMesh" uid="uid://ck46hlksx8k4c" path="res://assets/props/blake1/Gun.obj" id="2_oq4tu"]
[ext_resource type="Material" uid="uid://1wix8dscq3ht" path="res://assets/props/blake1/mat_blake1.tres" id="2_xgsjp"]
[ext_resource type="Script" path="res://scripts/gun_tip.gd" id="4_pijc8"]
[ext_resource type="CylinderMesh" uid="uid://b258hvvg8mkw7" path="res://props/explosion/mesh_gunshot.tres" id="5_01hol"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_1vwwu"]
bounce = 0.07
[sub_resource type="BoxShape3D" id="BoxShape3D_l38wm"]
size = Vector3(0.613525, 0.123215, 0.09)
[sub_resource type="BoxShape3D" id="BoxShape3D_5qea8"]
size = Vector3(0.261841, 0.123215, 0.09)
[node name="ItemCylinder" type="RigidBody3D"]
collision_layer = 5
mass = 2.0
physics_material_override = SubResource("PhysicsMaterial_1vwwu")
max_contacts_reported = 2
contact_monitor = true
script = ExtResource("1_863aw")
[node name="Gun" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.842878, -0.256887, 0.000919819)
material_override = ExtResource("2_xgsjp")
mesh = ExtResource("2_oq4tu")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0465088, 0.121468, 0)
shape = SubResource("BoxShape3D_l38wm")
[node name="CollisionShape3D2" type="CollisionShape3D" parent="."]
transform = Transform3D(0.155728, -0.9878, 0, 0.9878, 0.155728, 0, 0, 0, 1, -0.157361, -0.0522294, 0)
shape = SubResource("BoxShape3D_5qea8")
[node name="gun_tip" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.366662, 0.13981, 0)
script = ExtResource("4_pijc8")
chance = 0.5
[node name="Timer" type="Timer" parent="gun_tip"]
wait_time = 0.1
one_shot = true
[node name="gunshot" type="MeshInstance3D" parent="gun_tip"]
transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 14.9437, 0, 0)
visible = false
mesh = ExtResource("5_01hol")
[connection signal="collide" from="." to="gun_tip" method="_on_collide"]
[connection signal="timeout" from="gun_tip/Timer" to="gun_tip" method="_on_timer_timeout"]