mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:15:45 +00:00
Added lifetime to bullets
This commit is contained in:
parent
be52d0e081
commit
78c319224a
7 changed files with 50 additions and 2 deletions
|
|
@ -31,6 +31,8 @@ LethalTime = 4.0
|
|||
PreFireColor = Color(0, 0, 1, 0.501961)
|
||||
LethalColor = Color(0, 0, 1, 1)
|
||||
BulletScene = ExtResource("1_nfjet")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 40.0
|
||||
bulletCount = 8
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -55,6 +57,8 @@ Continuous = false
|
|||
[sub_resource type="Resource" id="Resource_7tuk4"]
|
||||
script = ExtResource("2_peiit")
|
||||
BulletScene = ExtResource("4_7kssw")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 40.0
|
||||
bulletCount = 16
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -79,6 +83,8 @@ Continuous = false
|
|||
[sub_resource type="Resource" id="Resource_reykq"]
|
||||
script = ExtResource("2_peiit")
|
||||
BulletScene = ExtResource("4_7kssw")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 40.0
|
||||
bulletCount = 16
|
||||
rotationSpeed = 0.0
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ Continuous = false
|
|||
[sub_resource type="Resource" id="Resource_puvpt"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("1_as8n2")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 20.0
|
||||
bulletCount = 20
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -46,6 +48,8 @@ Continuous = false
|
|||
[sub_resource type="Resource" id="Resource_44j24"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("1_as8n2")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 20.0
|
||||
bulletCount = 20
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -63,6 +67,8 @@ WaitForCompletion = true
|
|||
[sub_resource type="Resource" id="Resource_wkxow"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("4_tek7n")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 20.0
|
||||
bulletCount = 20
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -80,6 +86,8 @@ WaitForCompletion = false
|
|||
[sub_resource type="Resource" id="Resource_gcqck"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("4_tek7n")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 20.0
|
||||
bulletCount = 20
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -97,6 +105,8 @@ WaitForCompletion = true
|
|||
[sub_resource type="Resource" id="Resource_bxbto"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("5_n4xqo")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 20.0
|
||||
bulletCount = 20
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -114,6 +124,8 @@ WaitForCompletion = false
|
|||
[sub_resource type="Resource" id="Resource_q48s1"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("5_n4xqo")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 20.0
|
||||
bulletCount = 20
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -161,6 +173,8 @@ Continuous = false
|
|||
[sub_resource type="Resource" id="Resource_mpjrl"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("7_gsnyb")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 80.0
|
||||
bulletCount = 12
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -187,6 +201,8 @@ WaitForCompletion = true
|
|||
[sub_resource type="Resource" id="Resource_ncfnl"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("7_gsnyb")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 80.0
|
||||
bulletCount = 12
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -213,6 +229,8 @@ WaitForCompletion = true
|
|||
[sub_resource type="Resource" id="Resource_vkthc"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("7_gsnyb")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 80.0
|
||||
bulletCount = 12
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -239,6 +257,8 @@ WaitForCompletion = true
|
|||
[sub_resource type="Resource" id="Resource_n2gn4"]
|
||||
script = ExtResource("2_wkmhk")
|
||||
BulletScene = ExtResource("7_gsnyb")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 80.0
|
||||
bulletCount = 12
|
||||
rotationSpeed = 0.0
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ ScalingFactor = 10.0
|
|||
[sub_resource type="Resource" id="Resource_0v4v8"]
|
||||
script = ExtResource("2_7268a")
|
||||
BulletScene = ExtResource("1_o4um1")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 80.0
|
||||
bulletCount = 12
|
||||
rotationSpeed = 0.0
|
||||
|
|
@ -53,6 +55,8 @@ ScalingFactor = 10.0
|
|||
[sub_resource type="Resource" id="Resource_7yi74"]
|
||||
script = ExtResource("2_7268a")
|
||||
BulletScene = ExtResource("4_ruawj")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 80.0
|
||||
bulletCount = 12
|
||||
rotationSpeed = 0.0
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ decreaseRate = 4.0
|
|||
[resource]
|
||||
script = ExtResource("3_ryait")
|
||||
BulletScene = ExtResource("1_iwsrv")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 70.0
|
||||
bulletCount = 10
|
||||
rotationSpeed = 0.0
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
[sub_resource type="Resource" id="Resource_ne4q3"]
|
||||
script = ExtResource("2_ee42k")
|
||||
BulletScene = ExtResource("1_4xpdn")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 40.0
|
||||
bulletCount = 10
|
||||
rotationSpeed = 120.0
|
||||
|
|
@ -25,6 +27,8 @@ WaitForCompletion = true
|
|||
[sub_resource type="Resource" id="Resource_kohuh"]
|
||||
script = ExtResource("2_ee42k")
|
||||
BulletScene = ExtResource("3_gr7a3")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 50.0
|
||||
bulletCount = 16
|
||||
rotationSpeed = 60.0
|
||||
|
|
@ -42,6 +46,8 @@ WaitForCompletion = true
|
|||
[sub_resource type="Resource" id="Resource_depjj"]
|
||||
script = ExtResource("2_ee42k")
|
||||
BulletScene = ExtResource("1_4xpdn")
|
||||
_bulletLifeTime = 20.0
|
||||
_destroyOnCollision = false
|
||||
bulletSpeed = 50.0
|
||||
bulletCount = 10
|
||||
rotationSpeed = 60.0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=74 format=4 uid="uid://bv451a8wgty4u"]
|
||||
[gd_scene load_steps=75 format=4 uid="uid://bv451a8wgty4u"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bghghp5ep4w2j" path="res://Scenes/player.tscn" id="2_8mh54"]
|
||||
|
|
@ -122,6 +122,12 @@ ActivationType = 0
|
|||
Targets = Array[NodePath]([NodePath("../Rumia")])
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sf3bq"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("49_0si7g")
|
||||
Target = NodePath(".")
|
||||
WaitForCompletion = true
|
||||
|
||||
[node name="GameScene" type="Node2D" node_paths=PackedStringArray("PlayerSpawnMarker")]
|
||||
position = Vector2(38, 39)
|
||||
script = ExtResource("1_8tmoj")
|
||||
|
|
@ -580,7 +586,7 @@ Events = Array[Object]([SubResource("Resource_068l7"), SubResource("Resource_l3n
|
|||
|
||||
[node name="BossBattleStartScript" parent="." instance=ExtResource("43_kf3qc")]
|
||||
position = Vector2(-1487, -396)
|
||||
Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy")])
|
||||
Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_sf3bq")])
|
||||
|
||||
[node name="Enemy8" parent="." instance=ExtResource("47_u1ve6")]
|
||||
position = Vector2(-968, 206)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ namespace Cirno.Scripts.AttackPatterns;
|
|||
public partial class SpiralPattern : AttackPattern
|
||||
{
|
||||
[Export] public PackedScene BulletScene;
|
||||
[Export] private float _bulletLifeTime = 20f;
|
||||
[Export] private bool _destroyOnCollision = false;
|
||||
[Export] private float bulletSpeed = 5f;
|
||||
[Export] private int bulletCount = 16;
|
||||
[Export] private float rotationSpeed = 0f;
|
||||
|
|
@ -89,6 +91,8 @@ public partial class SpiralPattern : AttackPattern
|
|||
{
|
||||
Position = position,
|
||||
Direction = direction,
|
||||
LifeTime = _bulletLifeTime,
|
||||
DestroyOnCollision = _destroyOnCollision,
|
||||
Speed = bulletSpeed,
|
||||
Owner = owner,
|
||||
DamageType = _damageType,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue