TODO ghost aiming

main
Just Dzhi 2023-10-01 19:13:45 +04:00
parent 10e53ffc09
commit b1300c2483
4 changed files with 91 additions and 2 deletions

View File

@ -1,10 +1,11 @@
[gd_scene load_steps=4 format=2] [gd_scene load_steps=5 format=2]
[ext_resource path="res://src/models/enemies/ghost/sprites/ghost_spriteframes.tres" type="SpriteFrames" id=1] [ext_resource path="res://src/models/enemies/ghost/sprites/ghost_spriteframes.tres" type="SpriteFrames" id=1]
[ext_resource path="res://src/models/enemies/ghost/ghost.gd" type="Script" id=2] [ext_resource path="res://src/models/enemies/ghost/ghost.gd" type="Script" id=2]
[ext_resource path="res://src/models/enemies/ghost/sprites/aiming/aiming_spriteframes.tres" type="SpriteFrames" id=3]
[sub_resource type="RectangleShape2D" id=1] [sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 7, 9 ) extents = Vector2( 5.5, 5.5 )
[node name="Ghost" type="KinematicBody2D" groups=["enemy"]] [node name="Ghost" type="KinematicBody2D" groups=["enemy"]]
z_index = 2 z_index = 2
@ -14,6 +15,7 @@ script = ExtResource( 2 )
use_parent_material = true use_parent_material = true
frames = ExtResource( 1 ) frames = ExtResource( 1 )
animation = "idle" animation = "idle"
frame = 4
playing = true playing = true
centered = false centered = false
@ -22,3 +24,12 @@ centered = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 8.5, 13.5 ) position = Vector2( 8.5, 13.5 )
shape = SubResource( 1 ) shape = SubResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 9, 13 )
frames = ExtResource( 3 )
animation = "idle"
frame = 8
playing = true
centered = false
flip_h = true

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/aiming.png-e066cb03cebd1bc5600bde2b98774403.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://src/models/enemies/ghost/sprites/aiming/aiming.png"
dest_files=[ "res://.import/aiming.png-e066cb03cebd1bc5600bde2b98774403.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View File

@ -0,0 +1,43 @@
[gd_resource type="SpriteFrames" load_steps=10 format=2]
[ext_resource path="res://src/models/enemies/ghost/sprites/aiming/aiming.png" type="Texture" id=1]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 60, 11 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 0, 11, 60, 11 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 0, 22, 60, 11 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 0, 33, 60, 11 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 1 )
region = Rect2( 0, 44, 60, 11 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 0, 55, 60, 11 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 1 )
region = Rect2( 0, 66, 60, 11 )
[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 1 )
region = Rect2( 0, 77, 60, 11 )
[resource]
animations = [ {
"frames": [ null, SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ],
"loop": false,
"name": "idle",
"speed": 18.0
} ]