地面方向标识

master
chendian 2 years ago
parent 0cc449d981
commit 3f3140cad0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dpsxejelj58f8"
path="res://.godot/imported/readiness_hero.png-d9ad5917bf7df1f3d654dd39aaecd923.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://render/texture/readiness_hero.png"
dest_files=["res://.godot/imported/readiness_hero.png-d9ad5917bf7df1f3d654dd39aaecd923.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=0
compress/normal_map=2
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=false
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=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://xtipei54v35i"
path="res://.godot/imported/readiness_monster.png-c62163d25615aac211401f6ba719c65d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://render/texture/readiness_monster.png"
dest_files=["res://.godot/imported/readiness_monster.png-c62163d25615aac211401f6ba719c65d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=0
compress/normal_map=2
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=false
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=0

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://7ej8d4b1lc0v"]
[ext_resource type="Texture2D" uid="uid://dpsxejelj58f8" path="res://render/texture/readiness_hero.png" id="1_gkbai"]
[node name="ReadinessHero" type="Decal"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.358925, 0)
size = Vector3(1, 1, 1)
texture_albedo = ExtResource("1_gkbai")
cull_mask = 1

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://64e2u2uedpi1"]
[ext_resource type="Texture2D" uid="uid://xtipei54v35i" path="res://render/texture/readiness_monster.png" id="1_2mpei"]
[node name="ReadinessHero" type="Decal"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.358925, 0)
size = Vector3(1, 1, 1)
texture_albedo = ExtResource("1_2mpei")
cull_mask = 1

@ -7,6 +7,7 @@ class_name Character
@onready var buff = (%Buff as Buff)
@onready var skill = (%Skill as Skill)
@onready var battle = (%Battle as Battle)
@onready var effect = (%Effect as Effect)
func init(id:int,cfg:CharacterCfg,team:Enum.ETeam):
status.id = id
@ -14,13 +15,15 @@ func init(id:int,cfg:CharacterCfg,team:Enum.ETeam):
status.cfg = cfg
var half_height = Setting.pixel_size * Setting.sprite_scale * cfg.sprite_harf_height
var width = Setting.pixel_size * Setting.sprite_scale * cfg.sprite_width
var body_scale = Vector3(width,half_height*2,width)
collision.position = Vector3(0,half_height,0)
collision.scale = Vector3(width,half_height*2,width)
collision.scale = body_scale
status.basic_offset = Vector3(0,half_height,0)
status.ui_offset = Vector3(0,half_height*2.2,0)
view.scale = Vector3(1,Setting.sprite_scale,1)
view.init(cfg.sprite_frames)
skill.init()
effect.init(cfg.type,body_scale)
func init_after():
var cfg = status.cfg as CharacterCfg

@ -3,15 +3,29 @@ class_name Effect
@onready var afterimage = preload("res://scene/effect/afterimage/normal.tscn")
@onready var corpse = preload("res://scene/effect/afterimage/normal.tscn")
@onready var readiness_hero = preload("res://scene/effect/decal/readiness_hero.tscn")
@onready var readiness_monster = preload("res://scene/effect/decal/readiness_monster.tscn")
@onready var character = (get_owner() as Character)
@onready var view = (%View as View)
@onready var status = (%Status as Status)
func _ready():
pass
var rediness : Decal
func init(type:Enum.ECharacterType,body_scale:Vector3):
match type:
Enum.ECharacterType.Player:rediness = readiness_hero.instantiate()
Enum.ECharacterType.Monster:rediness = readiness_monster.instantiate()
if rediness:
rediness.scale = body_scale *1.5
rediness.scale.y = 10
rediness.position = Vector3.DOWN * 4
add_child(rediness)
func _process(delta):
pass
if status.move_dir:
var angle = status.move_dir.angle_to(Vector2.RIGHT)
rediness.rotation.y = angle
func cast_image(res:Resource):
var new_afterimage = afterimage.instantiate() as Afterimage

Loading…
Cancel
Save