mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(子弹): 添加链枪子弹资源与逻辑
添加链枪子弹的图片资源、脚本和场景文件 为RainbowCat子弹添加穿透属性和生命周期 在子弹AI预设中添加面向鼠标的功能
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://bgt6dok3wc7qs"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_0gg4y"]
|
||||
[ext_resource type="Texture2D" uid="uid://ccxdfsg5071t4" path="res://resources/bullets/chain-gun/Chain_Gun.webp" id="2_4hyk3"]
|
||||
[ext_resource type="Script" path="res://scripts/Contents/Bullets/ChainGun.gd" id="2_l7jtn"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_cl70o"]
|
||||
|
||||
[node name="ChainGun" instance=ExtResource("1_0gg4y")]
|
||||
script = ExtResource("2_l7jtn")
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
sprite_frames = SubResource("SpriteFrames_cl70o")
|
||||
|
||||
[node name="node" type="Sprite2D" parent="texture" index="1"]
|
||||
position = Vector2(74, 0)
|
||||
texture = ExtResource("2_4hyk3")
|
||||
|
||||
[node name="hitbox" parent="." index="1"]
|
||||
disabled = true
|
||||
@@ -51,6 +51,7 @@ alpha_curve = SubResource("CurveTexture_pwojl")
|
||||
|
||||
[node name="RainbowCat" instance=ExtResource("1_vvwmq")]
|
||||
script = ExtResource("2_4c1xc")
|
||||
lifeTime = 3000.0
|
||||
|
||||
[node name="texture" parent="." index="0"]
|
||||
rotation = 1.5708
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 334 B |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ccxdfsg5071t4"
|
||||
path="res://.godot/imported/Chain_Gun.webp-8454ff6a6dc03f15f9f16b345bdd4990.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/bullets/chain-gun/Chain_Gun.webp"
|
||||
dest_files=["res://.godot/imported/Chain_Gun.webp-8454ff6a6dc03f15f9f16b345bdd4990.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
@@ -10,3 +10,5 @@ static func trace(bullet: BulletBase, target: Vector2, speed: float):
|
||||
bullet.position.angle_to_point(target),
|
||||
speed
|
||||
)
|
||||
static func faceToMouse(bullet: BulletBase):
|
||||
bullet.rotation = bullet.position.angle_to_point(bullet.get_global_mouse_position())
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
extends BulletBase
|
||||
|
||||
func ai():
|
||||
PresetBulletAI.faceToMouse(self)
|
||||
func applyDot():
|
||||
pass
|
||||
@@ -1,5 +1,7 @@
|
||||
extends BulletBase
|
||||
class_name RainbowCat
|
||||
|
||||
func register():
|
||||
penerate = 1
|
||||
func ai():
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
|
||||
Reference in New Issue
Block a user