From b1300c24834198a6b17e85da13f2852654adc448 Mon Sep 17 00:00:00 2001 From: Just Dzhi Date: Sun, 1 Oct 2023 19:13:45 +0400 Subject: [PATCH] TODO ghost aiming --- src/models/enemies/ghost/Ghost.tscn | 15 +++++- .../enemies/ghost/sprites/aiming/aiming.png | Bin 0 -> 2256 bytes .../ghost/sprites/aiming/aiming.png.import | 35 ++++++++++++++ .../sprites/aiming/aiming_spriteframes.tres | 43 ++++++++++++++++++ 4 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 src/models/enemies/ghost/sprites/aiming/aiming.png create mode 100644 src/models/enemies/ghost/sprites/aiming/aiming.png.import create mode 100644 src/models/enemies/ghost/sprites/aiming/aiming_spriteframes.tres diff --git a/src/models/enemies/ghost/Ghost.tscn b/src/models/enemies/ghost/Ghost.tscn index 29d8b9f..8e2fe70 100644 --- a/src/models/enemies/ghost/Ghost.tscn +++ b/src/models/enemies/ghost/Ghost.tscn @@ -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/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] -extents = Vector2( 7, 9 ) +extents = Vector2( 5.5, 5.5 ) [node name="Ghost" type="KinematicBody2D" groups=["enemy"]] z_index = 2 @@ -14,6 +15,7 @@ script = ExtResource( 2 ) use_parent_material = true frames = ExtResource( 1 ) animation = "idle" +frame = 4 playing = true centered = false @@ -22,3 +24,12 @@ centered = false [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] position = Vector2( 8.5, 13.5 ) 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 diff --git a/src/models/enemies/ghost/sprites/aiming/aiming.png b/src/models/enemies/ghost/sprites/aiming/aiming.png new file mode 100644 index 0000000000000000000000000000000000000000..4960313841149b9e42f1ca3faea2a35fc273dab3 GIT binary patch literal 2256 zcmcImeM}Q)7_T^|qGHr2u=#O2Vw}_KU9X>aqoPvz5R0sKQpq4*?_TIh+pE{Z7Gu;o zf}0;B5Un4GAE0xJu(%yZgPr z=l6S_=bqe0X{m`L!e0wlC=?@-lS~$Pj)jM9$gA-Gz_v{@;AyBQX^~f<7&b;e1}L`g zh*Bs9eZyOAlFdAiW(Aj$;RHKS`duD~h6Hhb55wjH39*A5-fcwh)tx{Qo-?B9S~Fqx z!~+MPv|I!WmZw_T<+&`yp>Z>iSU(L3TtH$Fzsu?N(tab_!%M@pd>coR9*C4{L}$qX z5t}&;i5EnG=#?bK5(I(hDW%G;(=vK$Izkd8i4!_prN&fxTBD;?8YK8bVK|Y?rY)v~ zU@&-PL>-dkp>f>j^C^95r6A_uDvF|Tg2YJ@g9yx<@0J)p=Jv+)F_?gt6?u=u3vNVa zWb8toWJICVUJou$h}P{5<_TsD_cI<`r6goeeL%DMs zw*aq@C$eD9GT@eC`hsz6Xs;(vboMyqSR6Qk3&Olmm?{*?;}9gl>kwYxBlI}r#zV)8 zfRO~zDhSTLN~QI&Af#HUMcz#3-JIa_PL&k}HvkhO0V4{l2J1y&gvtu5M(SxbF^y2u z1knpM!$#m3iRm9$;P~wP{y@!UI@#@&7&i-&O-2-oQt~`UGbCvsw0Z)gR0aZ5>ogk7 zt|wVcYX^j$AoXgJviInM`%MCyC#O%|-`lsGz(S5thG;Fz=owbcVs;WzvKoyYqcmy? z1C&9NP3ct(MH>3p=8HUhbr|QftgEpEx~9Em_|#Hn1bbX95RlPd$v9bMP^4iw1xplD$$=ttT1j7vuRobp z^CffUQu5j&_r$V@%DTF)$J650u0jv)S`)YF&*IcgcWvQsa2?j7fNs^uf(>PvyKha2 ziY}R36B}8lZ1|ugqh>>%?v?RnyZ03px7~~ZIgUH*%`D01i2nLq+Wu3P6HKWzOkgc2u`D@UZL1AjlPSY9T23dPuPh84x&Ka7MoWF-`IMO{)vHE3_p=ip(h>Jo zbeh-ZC#Q%Jt&aRrx6YJwHG}xZ0Ne=#?8xOV literal 0 HcmV?d00001 diff --git a/src/models/enemies/ghost/sprites/aiming/aiming.png.import b/src/models/enemies/ghost/sprites/aiming/aiming.png.import new file mode 100644 index 0000000..f90d5dc --- /dev/null +++ b/src/models/enemies/ghost/sprites/aiming/aiming.png.import @@ -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 diff --git a/src/models/enemies/ghost/sprites/aiming/aiming_spriteframes.tres b/src/models/enemies/ghost/sprites/aiming/aiming_spriteframes.tres new file mode 100644 index 0000000..c44b7bf --- /dev/null +++ b/src/models/enemies/ghost/sprites/aiming/aiming_spriteframes.tres @@ -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 +} ]