diff --git a/scripts/Contents/Bullets/BigLaser.gd b/scripts/Contents/Bullets/BigLaser.gd index 5e4c278..db01f26 100644 --- a/scripts/Contents/Bullets/BigLaser.gd +++ b/scripts/Contents/Bullets/BigLaser.gd @@ -3,9 +3,6 @@ class_name BigLaser var dotTime: float = 100 -func register(): - speed = 0 - penerate = 1 func spawn(): CameraManager.shake(5000, 100) # 激光会运行5秒(5000毫秒),期间震屏超高强度 CameraManager.playAnimation("bigLaser") diff --git a/scripts/Contents/Bullets/BossAttack/Bear/ArrowSeven.gd b/scripts/Contents/Bullets/BossAttack/Bear/ArrowSeven.gd index f7043a3..5ca22cc 100644 --- a/scripts/Contents/Bullets/BossAttack/Bear/ArrowSeven.gd +++ b/scripts/Contents/Bullets/BossAttack/Bear/ArrowSeven.gd @@ -11,9 +11,6 @@ var traceTime: float = 2000 var forwardTime: float = 500 var forwarded: bool = false -func register(): - speed = 1 - baseDamage = 1 func spawn(): myColor = allColor.gradient.sample(randf()) superlight.material = superlight.material.duplicate() diff --git a/scripts/Contents/Bullets/BossAttack/Bear/ForeverRainbow.gd b/scripts/Contents/Bullets/BossAttack/Bear/ForeverRainbow.gd index 06b5dab..66f7220 100644 --- a/scripts/Contents/Bullets/BossAttack/Bear/ForeverRainbow.gd +++ b/scripts/Contents/Bullets/BossAttack/Bear/ForeverRainbow.gd @@ -4,9 +4,6 @@ extends BulletBase var myColor: Color -func register(): - baseDamage = 1 - penerate = 1 func spawn(): myColor = allColor.gradient.sample(randf()) setColor(myColor) diff --git a/scripts/Contents/Bullets/BossAttack/Bear/LightGun.gd b/scripts/Contents/Bullets/BossAttack/Bear/LightGun.gd index 9baf3cd..a8c6643 100644 --- a/scripts/Contents/Bullets/BossAttack/Bear/LightGun.gd +++ b/scripts/Contents/Bullets/BossAttack/Bear/LightGun.gd @@ -6,12 +6,8 @@ extends BulletBase @onready var track: ShaderStage = $"%track" @onready var sword: Sprite2D = $"%sword" @onready var points: GPUParticles2D = $"%points" - var myColor: Color -func register(): - speed = 1 - baseDamage = 1 - penerate = 1 + func spawn(): myColor = allColor.gradient.sample(randf()) track.material = track.material.duplicate() diff --git a/scripts/Contents/Bullets/BossAttack/Bear/SunDance.gd b/scripts/Contents/Bullets/BossAttack/Bear/SunDance.gd index 1a538ee..d675216 100644 --- a/scripts/Contents/Bullets/BossAttack/Bear/SunDance.gd +++ b/scripts/Contents/Bullets/BossAttack/Bear/SunDance.gd @@ -6,13 +6,8 @@ extends BulletBase @onready var leave2: Sprite2D = $"%leave2" @onready var leave3: Sprite2D = $"%leave3" @onready var leave4: Sprite2D = $"%leave4" - var myColor: Color -func register(): - speed = 0 - baseDamage = 1 - penerate = 1 func spawn(): myColor = allColor.gradient.sample(randf()) setColor(myColor) diff --git a/scripts/Contents/Bullets/BossAttack/KukeMC/HeavyCrystal.gd b/scripts/Contents/Bullets/BossAttack/KukeMC/HeavyCrystal.gd index 599e355..10a5427 100644 --- a/scripts/Contents/Bullets/BossAttack/KukeMC/HeavyCrystal.gd +++ b/scripts/Contents/Bullets/BossAttack/KukeMC/HeavyCrystal.gd @@ -4,8 +4,6 @@ extends BulletBase var readyTime: float = 1000 -func register(): - speed = 10 func ai(): if timeLived() < readyTime: PresetBulletAI.lockLauncher(self, launcher, true) diff --git a/scripts/Contents/Bullets/ChickLaser.gd b/scripts/Contents/Bullets/ChickLaser.gd index 30feeca..a8500c2 100644 --- a/scripts/Contents/Bullets/ChickLaser.gd +++ b/scripts/Contents/Bullets/ChickLaser.gd @@ -1,8 +1,6 @@ extends BulletBase class_name Laser -func register(): - penerate = 1 func ai(): rotation_degrees += 1 PresetBulletAI.lockLauncher(self, launcher, true) diff --git a/scripts/Contents/Bullets/ChickSprint.gd b/scripts/Contents/Bullets/ChickSprint.gd index 461313a..e7577e7 100644 --- a/scripts/Contents/Bullets/ChickSprint.gd +++ b/scripts/Contents/Bullets/ChickSprint.gd @@ -1,9 +1,6 @@ extends BulletBase class_name ChickSprint -func register(): - speed = 0 - penerate = 1 func ai(): baseDamage = launcher.velocity.length() / 500.0 PresetBulletAI.lockLauncher(self, launcher, true) diff --git a/scripts/Contents/Bullets/Diamond.gd b/scripts/Contents/Bullets/Diamond.gd index 03f35a6..4e0e2ad 100644 --- a/scripts/Contents/Bullets/Diamond.gd +++ b/scripts/Contents/Bullets/Diamond.gd @@ -3,8 +3,6 @@ class_name Diamond const traceTime = 1500 -func register(): - baseDamage = 2 func ai(): PresetBulletAI.forward(self, rotation) if timeLived() < traceTime: diff --git a/scripts/Contents/Bullets/LGBTBullet.gd b/scripts/Contents/Bullets/LGBTBullet.gd index 327fb37..5ad65f2 100644 --- a/scripts/Contents/Bullets/LGBTBullet.gd +++ b/scripts/Contents/Bullets/LGBTBullet.gd @@ -5,8 +5,6 @@ var tracer: EntityBase = null var maxTraceTime: float = 0 var tracePower: float = 0 -func register(): - speed = 1 func ai(): speed *= 1.05 speed = clamp(speed, 0, 20) diff --git a/scripts/Contents/Bullets/Meowmere.gd b/scripts/Contents/Bullets/Meowmere.gd index f13d946..0007a6e 100644 --- a/scripts/Contents/Bullets/Meowmere.gd +++ b/scripts/Contents/Bullets/Meowmere.gd @@ -1,6 +1,4 @@ extends BulletBase -func register(): - penerate = 1 func ai(): PresetBulletAI.lockLauncher(self, launcher, true) diff --git a/scripts/Contents/Bullets/Pencil.gd b/scripts/Contents/Bullets/Pencil.gd index 159560b..3261881 100644 --- a/scripts/Contents/Bullets/Pencil.gd +++ b/scripts/Contents/Bullets/Pencil.gd @@ -1,8 +1,6 @@ extends BulletBase class_name Pencil -func register(): - baseDamage = 20 func spawn(): await TickTool.millseconds(1000) hitbox.disabled = false diff --git a/scripts/Contents/Bullets/RainbowCat.gd b/scripts/Contents/Bullets/RainbowCat.gd index 1b193ed..7683aa4 100644 --- a/scripts/Contents/Bullets/RainbowCat.gd +++ b/scripts/Contents/Bullets/RainbowCat.gd @@ -1,8 +1,6 @@ extends BulletBase class_name RainbowCat -func register(): - penerate = 1 func ai(): PresetBulletAI.forward(self, rotation) func succeedToHit(_dmg: float, _entity: EntityBase): diff --git a/scripts/Contents/Bullets/Star.gd b/scripts/Contents/Bullets/Star.gd index 9a99081..8821283 100644 --- a/scripts/Contents/Bullets/Star.gd +++ b/scripts/Contents/Bullets/Star.gd @@ -1,7 +1,5 @@ extends BulletBase class_name Star -func register(): - baseDamage = 1 func ai(): PresetBulletAI.forward(self, rotation) diff --git a/scripts/Statemachine/BulletBase.gd b/scripts/Statemachine/BulletBase.gd index 70f31ce..437fa72 100644 --- a/scripts/Statemachine/BulletBase.gd +++ b/scripts/Statemachine/BulletBase.gd @@ -151,6 +151,7 @@ func trySplit(): for i in total: var cloned = duplicate() as BulletBase cloned.rotation = deg_to_rad(360.0 / total * i) + cloned.isChildSplit = true split(cloned, i, total, last) func tryRefract(): if is_instance_valid(launcher) and !isChildRefract: @@ -162,6 +163,7 @@ func tryRefract(): if is_instance_valid(entity): var cloned = duplicate() as BulletBase cloned.look_at(entity.position) + cloned.isChildRefract = true refract(cloned, entity, i, total, last) # 抽象方法