mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
Compare commits
6 Commits
edc31d876e
...
2f3912da34
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f3912da34 | |||
| 75fbef8895 | |||
| 14deb2de71 | |||
| cc103f274b | |||
| 30527a18a8 | |||
| f6e71507ce |
@@ -17,11 +17,12 @@ corner_detail = 1
|
|||||||
[node name="MuyangDog" unique_id=1046363300 instance=ExtResource("1_wq25g")]
|
[node name="MuyangDog" unique_id=1046363300 instance=ExtResource("1_wq25g")]
|
||||||
theme_override_styles/panel = SubResource("StyleBoxFlat_fi2nw")
|
theme_override_styles/panel = SubResource("StyleBoxFlat_fi2nw")
|
||||||
displayName = "牧羊犬"
|
displayName = "牧羊犬"
|
||||||
slogan = "以身挡险,恪守使命不离不弃"
|
slogan = "恪守使命不离不弃"
|
||||||
avatar = ExtResource("2_fi2nw")
|
avatar = ExtResource("2_fi2nw")
|
||||||
description = "每3秒发动格挡,弹反一切子弹。"
|
description = "每3秒发动格挡,弹反一切子弹。"
|
||||||
fields = Array[int]([0, 8, 3])
|
fields = Array[int]([0, 8, 3])
|
||||||
fieldValues = Array[float]([50.0, 0.15, -0.2])
|
fieldValues = Array[float]([50.0, 0.15, -0.2])
|
||||||
|
clickToRebuild = true
|
||||||
|
|
||||||
[node name="avatarTexture" parent="wrapper" parent_id_path=PackedInt32Array(2023039659) index="0" unique_id=1334645594]
|
[node name="avatarTexture" parent="wrapper" parent_id_path=PackedInt32Array(2023039659) index="0" unique_id=1334645594]
|
||||||
texture = ExtResource("2_fi2nw")
|
texture = ExtResource("2_fi2nw")
|
||||||
@@ -30,7 +31,7 @@ texture = ExtResource("2_fi2nw")
|
|||||||
text = "牧羊犬"
|
text = "牧羊犬"
|
||||||
|
|
||||||
[node name="sloganLabel" parent="wrapper/infoContainer/VBoxContainer" parent_id_path=PackedInt32Array(533915880) index="1" unique_id=280562204]
|
[node name="sloganLabel" parent="wrapper/infoContainer/VBoxContainer" parent_id_path=PackedInt32Array(533915880) index="1" unique_id=280562204]
|
||||||
text = "“以身挡险,恪守使命不离不弃”"
|
text = "“恪守使命不离不弃”"
|
||||||
|
|
||||||
[node name="descriptionLabel" parent="wrapper/infoContainer" parent_id_path=PackedInt32Array(143242635) index="1" unique_id=808054282]
|
[node name="descriptionLabel" parent="wrapper/infoContainer" parent_id_path=PackedInt32Array(143242635) index="1" unique_id=808054282]
|
||||||
text = "每3秒发动格挡,弹反一切子弹。"
|
text = "每3秒发动格挡,弹反一切子弹。"
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
[gd_scene format=3 uid="uid://beo6s1kudbbve"]
|
[gd_scene format=3 uid="uid://b14x2fai2bagp"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_u2ynr"]
|
[ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_u2ynr"]
|
||||||
[ext_resource type="Script" uid="uid://bub7ku5qf2tpo" path="res://scripts/Contents/Panels/GameOver.gd" id="2_6cd45"]
|
[ext_resource type="Script" uid="uid://bub7ku5qf2tpo" path="res://scripts/Contents/Panels/GameOver.gd" id="2_6cd45"]
|
||||||
[ext_resource type="FontFile" uid="uid://v3frxpuvtj5o" path="res://resources/fonts/syht-bold.ttf" id="3_2arur"]
|
[ext_resource type="FontFile" uid="uid://v3frxpuvtj5o" path="res://resources/fonts/syht-bold.ttf" id="3_2arur"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dbso1w8hvgilg" path="res://resources/sounds/effect/Lose.wav" id="3_n4aax"]
|
[ext_resource type="AudioStream" uid="uid://dbso1w8hvgilg" path="res://resources/sounds/effect/Lose.wav" id="3_n4aax"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://braggv3vafd83" path="res://components/UI/GameControl.tscn" id="4_idc4g"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7gbuu"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7gbuu"]
|
||||||
bg_color = Color(1, 0, 0, 0.3)
|
bg_color = Color(1, 0, 0, 0.3)
|
||||||
@@ -48,21 +49,9 @@ text = "[color=gray]死亡原因[/color]"
|
|||||||
fit_content = true
|
fit_content = true
|
||||||
autowrap_mode = 0
|
autowrap_mode = 0
|
||||||
|
|
||||||
[node name="gameControl" type="HBoxContainer" parent="content/wrapper/container/wrapper" index="1" unique_id=2129714003]
|
[node name="gameControl" parent="content/wrapper/container/wrapper/death" index="2" unique_id=1187018703 instance=ExtResource("4_idc4g")]
|
||||||
layout_mode = 2
|
|
||||||
alignment = 1
|
|
||||||
|
|
||||||
[node name="returnBtn" type="Button" parent="content/wrapper/container/wrapper/gameControl" index="0" unique_id=1955688444]
|
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
|
||||||
text = "重新开始游戏"
|
|
||||||
|
|
||||||
[node name="exitBtn" type="Button" parent="content/wrapper/container/wrapper/gameControl" index="1" unique_id=1303303813]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
text = "退出游戏"
|
|
||||||
|
|
||||||
[node name="audio" type="AudioStreamPlayer2D" parent="." index="2" unique_id=2020590816]
|
[node name="audio" type="AudioStreamPlayer2D" parent="." index="2" unique_id=2020590816]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
[gd_scene load_steps=5 format=3 uid="uid://cksonrrx38k36"]
|
[gd_scene format=3 uid="uid://cksonrrx38k36"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_q0gd0"]
|
[ext_resource type="PackedScene" uid="uid://d3qojeqa3difn" path="res://components/Abstracts/FullscreenPanelBase.tscn" id="1_q0gd0"]
|
||||||
[ext_resource type="Script" path="res://scripts/Contents/Panels/Pause.gd" id="2_lg6qs"]
|
[ext_resource type="Script" uid="uid://ba0tgtpjp34k8" path="res://scripts/Contents/Panels/Pause.gd" id="2_lg6qs"]
|
||||||
[ext_resource type="FontFile" uid="uid://v3frxpuvtj5o" path="res://resources/fonts/syht-bold.ttf" id="3_jxeor"]
|
[ext_resource type="FontFile" uid="uid://v3frxpuvtj5o" path="res://resources/fonts/syht-bold.ttf" id="3_jxeor"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://braggv3vafd83" path="res://components/UI/GameControl.tscn" id="4_tij4f"]
|
||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_hsvpc"]
|
[sub_resource type="LabelSettings" id="LabelSettings_hsvpc"]
|
||||||
font = ExtResource("3_jxeor")
|
font = ExtResource("3_jxeor")
|
||||||
font_size = 50
|
font_size = 50
|
||||||
|
|
||||||
[node name="Pause" instance=ExtResource("1_q0gd0")]
|
[node name="Pause" unique_id=518412591 instance=ExtResource("1_q0gd0")]
|
||||||
offset_top = 0.0
|
offset_top = 0.0
|
||||||
offset_bottom = 0.0
|
offset_bottom = 0.0
|
||||||
script = ExtResource("2_lg6qs")
|
script = ExtResource("2_lg6qs")
|
||||||
@@ -16,14 +17,12 @@ script = ExtResource("2_lg6qs")
|
|||||||
[node name="wrapper" parent="content" index="1"]
|
[node name="wrapper" parent="content" index="1"]
|
||||||
theme_override_constants/separation = 10
|
theme_override_constants/separation = 10
|
||||||
|
|
||||||
[node name="text" type="Label" parent="content/wrapper" index="0"]
|
[node name="text" type="Label" parent="content/wrapper" index="0" unique_id=884780519]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
text = "已暂停"
|
text = "已暂停"
|
||||||
label_settings = SubResource("LabelSettings_hsvpc")
|
label_settings = SubResource("LabelSettings_hsvpc")
|
||||||
|
|
||||||
[node name="aboutBtn" type="Button" parent="content/wrapper" index="1"]
|
[node name="gameControl" parent="content/wrapper" index="1" unique_id=1187018703 instance=ExtResource("4_tij4f")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
|
||||||
text = "关于↗"
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
[gd_scene format=3 uid="uid://braggv3vafd83"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://b63fkg0waovo" path="res://scripts/Statemachine/GameControl.gd" id="1_t5a04"]
|
||||||
|
|
||||||
|
[node name="GameControl" type="HBoxContainer" unique_id=1187018703]
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
script = ExtResource("1_t5a04")
|
||||||
|
|
||||||
|
[node name="returnBtn" type="Button" parent="." unique_id=2089710932]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
text = "重新开始游戏"
|
||||||
|
|
||||||
|
[node name="exitBtn" type="Button" parent="." unique_id=100260653]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
text = "退出游戏"
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Playlog
|
|
||||||
|
|
||||||
## 2025/9/30
|
|
||||||
|
|
||||||
平衡性已调整,可3个boss同窗无伤打完。
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
cd build/web
|
|
||||||
python -m http.server 8080
|
|
||||||
@@ -6,7 +6,7 @@ func ai():
|
|||||||
super.ai()
|
super.ai()
|
||||||
if parryCounter.isCooldowned():
|
if parryCounter.isCooldowned():
|
||||||
var track = getTrackingAnchor()
|
var track = getTrackingAnchor()
|
||||||
var bullet = BulletTool.findClosetBulletCanDamage(track, get_tree(), self , 400)
|
var bullet = BulletTool.findClosetBulletCanDamage(track, get_tree(), self , 300)
|
||||||
if is_instance_valid(bullet):
|
if is_instance_valid(bullet):
|
||||||
BulletBase.generate(ComponentManager.getBullet("Parrier"), self , track, track.angle_to_point(bullet.position))
|
BulletBase.generate(ComponentManager.getBullet("Parrier"), self , track, track.angle_to_point(bullet.position))
|
||||||
parryCounter.start()
|
parryCounter.start()
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ func tryLaunch(action: String, weaponIndex: int):
|
|||||||
var weapon = weapons[weaponIndex]
|
var weapon = weapons[weaponIndex]
|
||||||
if weapon.emitType == Weapon.EmitType.CHARGE:
|
if weapon.emitType == Weapon.EmitType.CHARGE:
|
||||||
if weapon.canAttackBy(self ):
|
if weapon.canAttackBy(self ):
|
||||||
chargeStartTime[weaponIndex] = Time.get_ticks_msec()
|
chargeStartTime[weaponIndex] = WorldManager.getTime()
|
||||||
chargeParticle.emitting = true
|
chargeParticle.emitting = true
|
||||||
chargeParticle.speed_scale = 1
|
chargeParticle.speed_scale = 1
|
||||||
elif weapon.emitType == Weapon.EmitType.CLICK_SHOOT || weapon.emitType == Weapon.EmitType.HOLD_LOOP:
|
elif weapon.emitType == Weapon.EmitType.CLICK_SHOOT || weapon.emitType == Weapon.EmitType.HOLD_LOOP:
|
||||||
@@ -70,7 +70,7 @@ func tryLaunch(action: String, weaponIndex: int):
|
|||||||
if weapon.emitType == Weapon.EmitType.CHARGE:
|
if weapon.emitType == Weapon.EmitType.CHARGE:
|
||||||
if chargeStartTime.has(weaponIndex):
|
if chargeStartTime.has(weaponIndex):
|
||||||
var startTime = chargeStartTime[weaponIndex]
|
var startTime = chargeStartTime[weaponIndex]
|
||||||
var endTime = Time.get_ticks_msec()
|
var endTime = WorldManager.getTime()
|
||||||
var chargedTime = endTime - startTime
|
var chargedTime = endTime - startTime
|
||||||
chargeStartTime.erase(weaponIndex)
|
chargeStartTime.erase(weaponIndex)
|
||||||
weapon.chargedTime = chargedTime * self.fields.get(FieldStore.Entity.CHARGE_SPEED)
|
weapon.chargedTime = chargedTime * self.fields.get(FieldStore.Entity.CHARGE_SPEED)
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ func tryLaunch(action: String, weaponIndex: int):
|
|||||||
var weapon = weapons[weaponIndex]
|
var weapon = weapons[weaponIndex]
|
||||||
if weapon.emitType == Weapon.EmitType.CHARGE:
|
if weapon.emitType == Weapon.EmitType.CHARGE:
|
||||||
if weapon.canAttackBy(self ):
|
if weapon.canAttackBy(self ):
|
||||||
chargeStartTime[weaponIndex] = Time.get_ticks_msec()
|
chargeStartTime[weaponIndex] = WorldManager.getTime()
|
||||||
chargeParticle.emitting = true
|
chargeParticle.emitting = true
|
||||||
chargeParticle.speed_scale = 1
|
chargeParticle.speed_scale = 1
|
||||||
elif weapon.emitType == Weapon.EmitType.CLICK_SHOOT || weapon.emitType == Weapon.EmitType.HOLD_LOOP:
|
elif weapon.emitType == Weapon.EmitType.CLICK_SHOOT || weapon.emitType == Weapon.EmitType.HOLD_LOOP:
|
||||||
@@ -70,7 +70,7 @@ func tryLaunch(action: String, weaponIndex: int):
|
|||||||
if weapon.emitType == Weapon.EmitType.CHARGE:
|
if weapon.emitType == Weapon.EmitType.CHARGE:
|
||||||
if chargeStartTime.has(weaponIndex):
|
if chargeStartTime.has(weaponIndex):
|
||||||
var startTime = chargeStartTime[weaponIndex]
|
var startTime = chargeStartTime[weaponIndex]
|
||||||
var endTime = Time.get_ticks_msec()
|
var endTime = WorldManager.getTime()
|
||||||
var chargedTime = endTime - startTime
|
var chargedTime = endTime - startTime
|
||||||
chargeStartTime.erase(weaponIndex)
|
chargeStartTime.erase(weaponIndex)
|
||||||
weapon.chargedTime = chargedTime * self.fields.get(FieldStore.Entity.CHARGE_SPEED)
|
weapon.chargedTime = chargedTime * self.fields.get(FieldStore.Entity.CHARGE_SPEED)
|
||||||
|
|||||||
@@ -3,30 +3,11 @@ extends FullscreenPanelBase
|
|||||||
|
|
||||||
@onready var audio: AudioStreamPlayer2D = $%audio
|
@onready var audio: AudioStreamPlayer2D = $%audio
|
||||||
@onready var deadreason: RichTextLabel = $%deadreason
|
@onready var deadreason: RichTextLabel = $%deadreason
|
||||||
@onready var returnBtn: Button = $%returnBtn
|
@onready var gameControl: GameControl = $%gameControl
|
||||||
@onready var exitBtn: Button = $%exitBtn
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
returnBtn.pressed.connect(
|
|
||||||
func():
|
|
||||||
returnBtn.disabled = true
|
|
||||||
for bullet in get_tree().get_nodes_in_group("bullets"):
|
|
||||||
bullet.queue_free()
|
|
||||||
for entity in get_tree().get_nodes_in_group("entities"):
|
|
||||||
entity.queue_free()
|
|
||||||
UIState.setPanel("Starter")
|
|
||||||
)
|
|
||||||
exitBtn.pressed.connect(
|
|
||||||
func():
|
|
||||||
get_tree().quit()
|
|
||||||
)
|
|
||||||
|
|
||||||
func beforeOpen(args: Array = []):
|
func beforeOpen(args: Array = []):
|
||||||
audio.play()
|
audio.play()
|
||||||
var reasonTemplate = MathTool.randomChoiceFrom(GameRule.deadReasons)
|
var reasonTemplate = MathTool.randomChoiceFrom(GameRule.deadReasons)
|
||||||
deadreason.text = ("[color=gray]" + reasonTemplate + "凶手是[b]%s[/b]的[b]%s[/b]。[/color]") % args
|
deadreason.text = ("[color=gray]" + reasonTemplate + "凶手是[b]%s[/b]的[b]%s[/b]。[/color]") % args
|
||||||
for item in OutGameStorage.inventory:
|
|
||||||
OutGameStorage.inventory[item] += UIState.player.inventory[item]
|
|
||||||
func afterOpen(_args: Array = []):
|
func afterOpen(_args: Array = []):
|
||||||
returnBtn.disabled = false
|
gameControl.enable()
|
||||||
exitBtn.disabled = false
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
@tool
|
@tool
|
||||||
extends FullscreenPanelBase
|
extends FullscreenPanelBase
|
||||||
|
class_name PausePanel
|
||||||
|
|
||||||
@onready var aboutBtn: Button = $"%aboutBtn"
|
@onready var gameControl: GameControl = $%gameControl
|
||||||
|
|
||||||
func _ready():
|
func afterOpen(_args: Array = []):
|
||||||
aboutBtn.pressed.connect(
|
gameControl.enable()
|
||||||
func():
|
|
||||||
UIState.setPanel("Thanks")
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ var distance: float = 200
|
|||||||
var bullets: Array[BulletBase] = []
|
var bullets: Array[BulletBase] = []
|
||||||
|
|
||||||
func start():
|
func start():
|
||||||
startTime = Time.get_ticks_msec()
|
startTime = WorldManager.getTime()
|
||||||
running = true
|
running = true
|
||||||
func lifetime():
|
func lifetime():
|
||||||
return Time.get_ticks_msec() - startTime
|
return WorldManager.getTime() - startTime
|
||||||
func getStateAngle(index: int):
|
func getStateAngle(index: int):
|
||||||
return lifetime() / period * deg_to_rad(360) - deg_to_rad(360.0 * index / len(bullets))
|
return lifetime() / period * deg_to_rad(360) - deg_to_rad(360.0 * index / len(bullets))
|
||||||
func forceFilter():
|
func forceFilter():
|
||||||
|
|||||||
@@ -59,4 +59,5 @@ static func create(scene: PackedScene, spawnPosition: Vector2, parent: Node = nu
|
|||||||
parent.add_child(cloned)
|
parent.add_child(cloned)
|
||||||
else:
|
else:
|
||||||
WorldManager.rootNode.add_child(cloned)
|
WorldManager.rootNode.add_child(cloned)
|
||||||
|
cloned.add_to_group("effects")
|
||||||
return cloned
|
return cloned
|
||||||
|
|||||||
@@ -448,7 +448,8 @@ func tryDie(by: BulletBase = null):
|
|||||||
UIState.showTip("[b]%s[/b] 已被打败!" % displayName, TipBox.MessageType.CONGRATULATION)
|
UIState.showTip("[b]%s[/b] 已被打败!" % displayName, TipBox.MessageType.CONGRATULATION)
|
||||||
elif isPlayer():
|
elif isPlayer():
|
||||||
UIState.showTip("[b]%s[/b] 似了😭。" % displayName, TipBox.MessageType.ERROR)
|
UIState.showTip("[b]%s[/b] 似了😭。" % displayName, TipBox.MessageType.ERROR)
|
||||||
queue_free()
|
if !isPlayer():
|
||||||
|
queue_free()
|
||||||
func tryHeal(count: float):
|
func tryHeal(count: float):
|
||||||
playSound("heal")
|
playSound("heal")
|
||||||
healed.emit(heal(count * fields.get(FieldStore.Entity.HEAL_ABILITY)))
|
healed.emit(heal(count * fields.get(FieldStore.Entity.HEAL_ABILITY)))
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
extends Control
|
||||||
|
class_name GameControl
|
||||||
|
|
||||||
|
@onready var returnBtn: Button = $%returnBtn
|
||||||
|
@onready var exitBtn: Button = $%exitBtn
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
returnBtn.pressed.connect(
|
||||||
|
func():
|
||||||
|
disable()
|
||||||
|
GameBusManager.restart(get_tree())
|
||||||
|
)
|
||||||
|
exitBtn.pressed.connect(
|
||||||
|
func():
|
||||||
|
disable()
|
||||||
|
get_tree().quit()
|
||||||
|
)
|
||||||
|
enable()
|
||||||
|
|
||||||
|
func enable():
|
||||||
|
returnBtn.disabled = false
|
||||||
|
exitBtn.disabled = false
|
||||||
|
func disable():
|
||||||
|
returnBtn.disabled = true
|
||||||
|
exitBtn.disabled = true
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://b63fkg0waovo
|
||||||
@@ -64,6 +64,7 @@ static func generate(
|
|||||||
WorldManager.rootNode.call_deferred("add_child", instance)
|
WorldManager.rootNode.call_deferred("add_child", instance)
|
||||||
instance.add_to_group("drops")
|
instance.add_to_group("drops")
|
||||||
instance.refindPlayer(WorldManager.tree)
|
instance.refindPlayer(WorldManager.tree)
|
||||||
|
instance.add_to_group("items")
|
||||||
return instance
|
return instance
|
||||||
static func getDrops() -> Array[ItemDropped]:
|
static func getDrops() -> Array[ItemDropped]:
|
||||||
var result: Array[ItemDropped] = []
|
var result: Array[ItemDropped] = []
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ func _process(_delta):
|
|||||||
label.text = text
|
label.text = text
|
||||||
|
|
||||||
func destroy():
|
func destroy():
|
||||||
|
if animator.is_playing(): return
|
||||||
animator.play("hide")
|
animator.play("hide")
|
||||||
await animator.animation_finished
|
await animator.animation_finished
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ static var tips: VBoxContainer
|
|||||||
static var itemsContainer: Control
|
static var itemsContainer: Control
|
||||||
static var energyContainer: Control
|
static var energyContainer: Control
|
||||||
|
|
||||||
|
static var showingFields: bool = false
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
bossbar = $%bossbar
|
bossbar = $%bossbar
|
||||||
panels = $%panels
|
panels = $%panels
|
||||||
@@ -43,17 +45,23 @@ func _physics_process(_delta):
|
|||||||
bossbar.visible = true
|
bossbar.visible = true
|
||||||
itemsContainer.visible = true
|
itemsContainer.visible = true
|
||||||
energyContainer.visible = true
|
energyContainer.visible = true
|
||||||
if Input.is_action_just_pressed("showFields"):
|
if !fieldsAnimator.is_playing():
|
||||||
for i in fields.get_children():
|
if showingFields:
|
||||||
fields.remove_child(i)
|
if Input.is_action_just_released("showFields") || !(currentPanel is PausePanel):
|
||||||
for i in player.fields:
|
showingFields = false
|
||||||
if player.fields[i] == EntityBase.TITLE_FLAG:
|
fieldsAnimator.play("hide")
|
||||||
fields.add_child(QuickUI.graySmallText(i))
|
else:
|
||||||
else:
|
if Input.is_action_just_pressed("showFields") || currentPanel is PausePanel:
|
||||||
fields.add_child(FieldShow.create(i, player.fields[i], false, player, true))
|
showingFields = true
|
||||||
fieldsAnimator.play("show")
|
for i in fields.get_children():
|
||||||
if Input.is_action_just_released("showFields"):
|
fields.remove_child(i)
|
||||||
fieldsAnimator.play("hide")
|
for i in player.fields:
|
||||||
|
if player.fields[i] == EntityBase.TITLE_FLAG:
|
||||||
|
fields.add_child(QuickUI.graySmallText(i))
|
||||||
|
else:
|
||||||
|
fields.add_child(FieldShow.create(i, player.fields[i], false, player, true))
|
||||||
|
fieldsAnimator.play("show")
|
||||||
|
|
||||||
if Input.is_action_just_pressed("pause"):
|
if Input.is_action_just_pressed("pause"):
|
||||||
if currentPanel:
|
if currentPanel:
|
||||||
if currentPanel is MakeFeedPanel:
|
if currentPanel is MakeFeedPanel:
|
||||||
@@ -95,5 +103,10 @@ static func closeCurrentPanel():
|
|||||||
static func showTip(text: String, messageType: TipBox.MessageType = TipBox.MessageType.INFO):
|
static func showTip(text: String, messageType: TipBox.MessageType = TipBox.MessageType.INFO):
|
||||||
var box = TipBox.create(text, messageType)
|
var box = TipBox.create(text, messageType)
|
||||||
tips.add_child(box)
|
tips.add_child(box)
|
||||||
|
await box.animator.animation_finished
|
||||||
await TickTool.millseconds(500 * len(text))
|
await TickTool.millseconds(500 * len(text))
|
||||||
box.destroy()
|
box.destroy()
|
||||||
|
static func clearTips():
|
||||||
|
for child in tips.get_children():
|
||||||
|
if child is TipBox:
|
||||||
|
child.destroy()
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ func apply(entity: EntityBase):
|
|||||||
selected.emit(allHave)
|
selected.emit(allHave)
|
||||||
return allHave
|
return allHave
|
||||||
func countOf(index: int) -> int:
|
func countOf(index: int) -> int:
|
||||||
return ceil(costCounts[index] * multipiler())
|
var base = costCounts[index]
|
||||||
|
return ceil(base * multipiler()) if base > 0 else floor(base / multipiler())
|
||||||
func multipiler() -> float:
|
func multipiler() -> float:
|
||||||
if is_instance_valid(UIState.player):
|
if is_instance_valid(UIState.player):
|
||||||
return 1 - UIState.player.fields.get(FieldStore.Entity.PRICE_REDUCTION)
|
return 1 - UIState.player.fields.get(FieldStore.Entity.PRICE_REDUCTION)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
class_name GameRule
|
class_name GameRule
|
||||||
|
|
||||||
static var deadReasons: Array = JsonTool.parseJson("res://resources/constants/deadReasons.json")
|
static var deadReasons: Array = JsonTool.parseJson("res://resources/constants/deadReasons.json")
|
||||||
|
static var helpText: String
|
||||||
static var difficultyRange: Vector2 = Vector2(-20, 50) # 难度倍数范围,包括最小值和最大值,负数则降低难度
|
static var difficultyRange: Vector2 = Vector2(-20, 50) # 难度倍数范围,包括最小值和最大值,负数则降低难度
|
||||||
static var difficulty: float = 1 # 难度倍数,可以写小数
|
static var difficulty: float = 1 # 难度倍数,可以写小数
|
||||||
static var allowFriendlyFire: bool = false # 是否允许友军伤害
|
static var allowFriendlyFire: bool = false # 是否允许友军伤害
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ class_name CameraManager
|
|||||||
@onready var animator: AnimationPlayer = $"%animator"
|
@onready var animator: AnimationPlayer = $"%animator"
|
||||||
|
|
||||||
var shakeIntensity: float = 0
|
var shakeIntensity: float = 0
|
||||||
|
var shaking: bool = false
|
||||||
|
|
||||||
static var instance: CameraManager = null
|
static var instance: CameraManager = null
|
||||||
|
|
||||||
@@ -25,8 +26,11 @@ static func shake(millseconds: float, intensity: float = 10, steper: Callable =
|
|||||||
await TickTool.until(
|
await TickTool.until(
|
||||||
func():
|
func():
|
||||||
instance.shakeIntensity = steper.call(instance.shakeIntensity, intensity, 1 - (WorldManager.getTime() - startTime) / millseconds)
|
instance.shakeIntensity = steper.call(instance.shakeIntensity, intensity, 1 - (WorldManager.getTime() - startTime) / millseconds)
|
||||||
return WorldManager.getTime() - startTime >= millseconds
|
return WorldManager.getTime() - startTime >= millseconds || !instance.shaking
|
||||||
)
|
)
|
||||||
instance.shakeIntensity = 0
|
instance.shakeIntensity = 0
|
||||||
|
static func shakeStop():
|
||||||
|
instance.shaking = false
|
||||||
|
instance.shakeIntensity = 0
|
||||||
static func playAnimation(animation: String):
|
static func playAnimation(animation: String):
|
||||||
instance.animator.play(animation)
|
instance.animator.play(animation)
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
class_name GameBusManager
|
||||||
|
|
||||||
|
static func restart(tree: SceneTree):
|
||||||
|
for bullet in tree.get_nodes_in_group("bullets"):
|
||||||
|
bullet.queue_free()
|
||||||
|
for entity in tree.get_nodes_in_group("entities"):
|
||||||
|
entity.queue_free()
|
||||||
|
for effect in tree.get_nodes_in_group("effects"):
|
||||||
|
effect.queue_free()
|
||||||
|
for item in tree.get_nodes_in_group("items"):
|
||||||
|
item.queue_free()
|
||||||
|
|
||||||
|
OutGameStorage.saveInventory()
|
||||||
|
CameraManager.shakeStop()
|
||||||
|
WorldManager.timeRestart()
|
||||||
|
|
||||||
|
UIState.setPanel("Starter")
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cf1agt55tt4pu
|
||||||
@@ -38,6 +38,8 @@ func spawn(node: Node):
|
|||||||
func justReturn(data):
|
func justReturn(data):
|
||||||
return ArrayTool.parseEncodedObject(data)[0]
|
return ArrayTool.parseEncodedObject(data)[0]
|
||||||
|
|
||||||
|
static func timeRestart():
|
||||||
|
runningTime = 0
|
||||||
static func getTime():
|
static func getTime():
|
||||||
return runningTime
|
return runningTime
|
||||||
static func spawnNode(node: Node):
|
static func spawnNode(node: Node):
|
||||||
|
|||||||
@@ -19,3 +19,7 @@ static var upgradableFieldsLevel = ArrayTool.fill(upgradableFieldsAdvance, func(
|
|||||||
static var maxInitialFeedCount: int = 3
|
static var maxInitialFeedCount: int = 3
|
||||||
static var maxInitialWeaponCount: int = 3
|
static var maxInitialWeaponCount: int = 3
|
||||||
static var inventory = ArrayTool.fill(upgradableFieldsCost, func(_k): return 0)
|
static var inventory = ArrayTool.fill(upgradableFieldsCost, func(_k): return 0)
|
||||||
|
|
||||||
|
static func saveInventory():
|
||||||
|
for item in OutGameStorage.inventory:
|
||||||
|
OutGameStorage.inventory[item] += UIState.player.inventory[item]
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://dkawfjwj80sqj"
|
|
||||||
path="res://.godot/imported/sjt.png-1b93f593cde723b537a6010a0c0d0d60.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://sjt.png"
|
|
||||||
dest_files=["res://.godot/imported/sjt.png-1b93f593cde723b537a6010a0c0d0d60.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/channel_remap/red=0
|
|
||||||
process/channel_remap/green=1
|
|
||||||
process/channel_remap/blue=2
|
|
||||||
process/channel_remap/alpha=3
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
||||||
@@ -1,18 +1,3 @@
|
|||||||
# Todo
|
# Todo
|
||||||
|
|
||||||
1. 完成Godockly UGC框架。
|
1. 完成Godockly UGC框架。
|
||||||
2. 设计新boss
|
|
||||||
|
|
||||||
## 新boss
|
|
||||||
|
|
||||||
主题:强大的防御能力+近战攻击。
|
|
||||||
|
|
||||||
### 招式
|
|
||||||
|
|
||||||
1. 使用**扫帚**进行4段挥舞攻击,上挑-下批-短戳-突刺(cooldown=6s)
|
|
||||||
2. **扫帚**蓄力0.5s,向玩家冲刺,**距离足够近或冲刺结束**后挥出武器(蓄力+攻击互斥)
|
|
||||||
3. 召唤3把**扫帚炮**,每0.2s释放发射一柱**灰尘射线**(cooldown=10s)
|
|
||||||
4. 召唤**自旋扫帚**,每1秒旋转1圈,此时boss移速+100%(cooldown=8s,蓄力)
|
|
||||||
5. 发射**扫帚回旋镖**,可飞行1秒后回旋(攻击互斥)
|
|
||||||
6. 发动**格挡**,抵挡玩家的近战或射弹伤害(cooldown=2s)
|
|
||||||
7. 发动**闪避**,侧向冲刺躲避离自身最近的玩家子弹(cooldown=5s)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user