mirror of
https://github.com/Steffo99/cinnos.git
synced 2024-11-22 08:04:20 +00:00
Add bullet ball
This commit is contained in:
parent
3ba4b54c45
commit
cd7f5ed906
5 changed files with 32 additions and 27 deletions
|
@ -18,7 +18,7 @@
|
||||||
[ext_resource type="PackedScene" path="res://obstacles/vent.tscn" id="15_hwvsi"]
|
[ext_resource type="PackedScene" path="res://obstacles/vent.tscn" id="15_hwvsi"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cbmkrd5kwiujt" path="res://obstacles/torretta.tscn" id="17_6hms3"]
|
[ext_resource type="PackedScene" uid="uid://cbmkrd5kwiujt" path="res://obstacles/torretta.tscn" id="17_6hms3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://mahsivqsy3oo" path="res://obstacles/panchina.tscn" id="18_ijdrl"]
|
[ext_resource type="PackedScene" uid="uid://mahsivqsy3oo" path="res://obstacles/panchina.tscn" id="18_ijdrl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c1p6udf66lht2" path="res://obstacles/bullet.tscn" id="19_fskgs"]
|
[ext_resource type="PackedScene" uid="uid://c8ey6yaaj70kw" path="res://obstacles/bullet_ball.tscn" id="19_u5bb2"]
|
||||||
|
|
||||||
[sub_resource type="Theme" id="Theme_hkcet"]
|
[sub_resource type="Theme" id="Theme_hkcet"]
|
||||||
Label/fonts/font = ExtResource("3_p3wyc")
|
Label/fonts/font = ExtResource("3_p3wyc")
|
||||||
|
@ -260,9 +260,10 @@ transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 4, -2.89718, 0, 8.66797)
|
||||||
[node name="Panchina" parent="." instance=ExtResource("18_ijdrl")]
|
[node name="Panchina" parent="." instance=ExtResource("18_ijdrl")]
|
||||||
|
|
||||||
[node name="Torretta" parent="." instance=ExtResource("17_6hms3")]
|
[node name="Torretta" parent="." instance=ExtResource("17_6hms3")]
|
||||||
transform = Transform3D(-0.810819, 0, 0.585297, 0, 1, 0, -0.585297, 0, -0.810819, -5.62694, 0, -13.6183)
|
transform = Transform3D(-0.810819, 0, 0.585297, 0, 1, 0, -0.585297, 0, -0.810819, -1.29953, 2.64886, 17.8504)
|
||||||
|
|
||||||
[node name="Bullet" parent="." instance=ExtResource("19_fskgs")]
|
[node name="Torretta2" parent="." instance=ExtResource("17_6hms3")]
|
||||||
transform = Transform3D(-4.37114e-08, 1, 4.37114e-08, 0, -4.37114e-08, 1, 1, 4.37114e-08, 1.91069e-15, -11.0235, 0, 14.2821)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 28.2944, 1, -22.5985)
|
||||||
|
bullet = ExtResource("19_u5bb2")
|
||||||
|
|
||||||
[connection signal="timeout" from="UI/TextBox/Timer" to="UI/TextBox" method="_on_timer_timeout"]
|
[connection signal="timeout" from="UI/TextBox/Timer" to="UI/TextBox" method="_on_timer_timeout"]
|
||||||
|
|
|
@ -7,7 +7,7 @@ extends StaticBody3D
|
||||||
@export var rotation_speed = 0.1
|
@export var rotation_speed = 0.1
|
||||||
@export var initial_cooldown: float = 0.2
|
@export var initial_cooldown: float = 0.2
|
||||||
|
|
||||||
var bullet = preload("res://obstacles/bullet.tscn")
|
@export var bullet = preload("res://obstacles/bullet.tscn")
|
||||||
var cooldown = 0
|
var cooldown = 0
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
|
26
obstacles/bullet_ball.tscn
Normal file
26
obstacles/bullet_ball.tscn
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://c8ey6yaaj70kw"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://obstacles/bullet.gd" id="1_igsmj"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c3g6lxikgfr7e" path="res://models/balla.glb" id="2_48nmr"]
|
||||||
|
|
||||||
|
[sub_resource type="SphereShape3D" id="SphereShape3D_c6uuh"]
|
||||||
|
radius = 0.435146
|
||||||
|
|
||||||
|
[node name="Bullet" type="RigidBody3D"]
|
||||||
|
transform = Transform3D(-4.37114e-08, 1, 4.37114e-08, 0, -4.37114e-08, 1, 1, 4.37114e-08, 1.91069e-15, 0, 0, 0)
|
||||||
|
collision_layer = 4
|
||||||
|
collision_mask = 4
|
||||||
|
gravity_scale = 0.0
|
||||||
|
continuous_cd = true
|
||||||
|
max_contacts_reported = 1
|
||||||
|
contact_monitor = true
|
||||||
|
script = ExtResource("1_igsmj")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
transform = Transform3D(1, -4.6454e-15, 6.92218e-22, 4.6454e-15, 1, -3.4244e-15, -6.92218e-22, 3.4244e-15, 1, 0, 0, 0)
|
||||||
|
shape = SubResource("SphereShape3D_c6uuh")
|
||||||
|
|
||||||
|
[node name="balla" parent="." instance=ExtResource("2_48nmr")]
|
||||||
|
transform = Transform3D(0.427778, 0, -1.05879e-22, 0, 0.427778, 3.57275e-23, -1.05879e-22, 3.57275e-23, 0.427778, 0, 0, 0)
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
|
@ -7,7 +7,6 @@
|
||||||
size = Vector3(1.9188, 3.57475, 2.31203)
|
size = Vector3(1.9188, 3.57475, 2.31203)
|
||||||
|
|
||||||
[node name="Torretta" type="StaticBody3D"]
|
[node name="Torretta" type="StaticBody3D"]
|
||||||
transform = Transform3D(-0.810819, 0, 0.585297, 0, 1, 0, -0.585297, 0, -0.810819, -11.1919, 0.928251, 6.08668)
|
|
||||||
script = ExtResource("1_wqejx")
|
script = ExtResource("1_wqejx")
|
||||||
initial_cooldown = 0.5
|
initial_cooldown = 0.5
|
||||||
|
|
||||||
|
@ -16,5 +15,3 @@ initial_cooldown = 0.5
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, -2.98023e-08, 0, 1, 0, 2.98023e-08, 0, 1, 0, 1.09828, 0)
|
transform = Transform3D(1, 0, -2.98023e-08, 0, 1, 0, 2.98023e-08, 0, 1, 0, 1.09828, 0)
|
||||||
shape = SubResource("BoxShape3D_hwxik")
|
shape = SubResource("BoxShape3D_hwxik")
|
||||||
|
|
||||||
[node name="RayCast3D" type="RayCast3D" parent="."]
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://ds01yl3tf0tva"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Torretta.gd" id="1_6tulh"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://t0gblqb4yr8m" path="res://models/turret.glb" id="2_64e5x"]
|
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_hwxik"]
|
|
||||||
size = Vector3(1.9188, 3.57475, 2.31203)
|
|
||||||
|
|
||||||
[node name="Torretta" type="StaticBody3D"]
|
|
||||||
transform = Transform3D(-0.810819, 0, 0.585297, 0, 1, 0, -0.585297, 0, -0.810819, -11.1919, 0.928251, 6.08668)
|
|
||||||
script = ExtResource("1_6tulh")
|
|
||||||
|
|
||||||
[node name="turret" parent="." instance=ExtResource("2_64e5x")]
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
|
||||||
transform = Transform3D(1, 0, -2.98023e-08, 0, 1, 0, 2.98023e-08, 0, 1, 0, 1.09828, 0)
|
|
||||||
shape = SubResource("BoxShape3D_hwxik")
|
|
||||||
|
|
||||||
[node name="RayCast3D" type="RayCast3D" parent="."]
|
|
Loading…
Reference in a new issue