Added NPC ArrowGirl
This commit is contained in:
14
ArrowGirl/ArrowGirl.gd
Normal file
14
ArrowGirl/ArrowGirl.gd
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
class_name ArrowGirl extends Area2D
|
||||||
|
|
||||||
|
@onready var _sprite = $AnimatedSprite2D
|
||||||
|
|
||||||
|
#boilerplate
|
||||||
|
func _ready():
|
||||||
|
_sprite.play("idle", 1)
|
||||||
|
|
||||||
|
#animation stuff
|
||||||
|
func _on_animation_finished() -> void:
|
||||||
|
if randf() < 0.2:
|
||||||
|
_sprite.play("idle_glance", 2)
|
||||||
|
else:
|
||||||
|
_sprite.play("idle", 2)
|
||||||
1
ArrowGirl/ArrowGirl.gd.uid
Normal file
1
ArrowGirl/ArrowGirl.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dqnhd2oej7xbw
|
||||||
BIN
ArrowGirl/ArrowGirl.png
Normal file
BIN
ArrowGirl/ArrowGirl.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 762 B |
40
ArrowGirl/ArrowGirl.png.import
Normal file
40
ArrowGirl/ArrowGirl.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dvuvwdk6nr4nb"
|
||||||
|
path="res://.godot/imported/ArrowGirl.png-d4d75df81e356cd6ff3873d27dc6b64f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://ArrowGirl/ArrowGirl.png"
|
||||||
|
dest_files=["res://.godot/imported/ArrowGirl.png-d4d75df81e356cd6ff3873d27dc6b64f.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
|
||||||
55
ArrowGirl/ArrowGirl.tscn
Normal file
55
ArrowGirl/ArrowGirl.tscn
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
[gd_scene format=3 uid="uid://cn8srrkyt4h8e"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dvuvwdk6nr4nb" path="res://ArrowGirl/ArrowGirl.png" id="1_5i1ac"]
|
||||||
|
[ext_resource type="Script" uid="uid://dqnhd2oej7xbw" path="res://ArrowGirl/ArrowGirl.gd" id="1_53v1e"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_y2354"]
|
||||||
|
atlas = ExtResource("1_5i1ac")
|
||||||
|
region = Rect2(0, 0, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ni31j"]
|
||||||
|
atlas = ExtResource("1_5i1ac")
|
||||||
|
region = Rect2(0, 0, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_xlvrw"]
|
||||||
|
atlas = ExtResource("1_5i1ac")
|
||||||
|
region = Rect2(32, 0, 32, 32)
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_73fnb"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_y2354")
|
||||||
|
}],
|
||||||
|
"loop": false,
|
||||||
|
"name": &"idle",
|
||||||
|
"speed": 1.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ni31j")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_xlvrw")
|
||||||
|
}],
|
||||||
|
"loop": false,
|
||||||
|
"name": &"idle_glance",
|
||||||
|
"speed": 1.0
|
||||||
|
}]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_53v1e"]
|
||||||
|
size = Vector2(32, 32)
|
||||||
|
|
||||||
|
[node name="ArrowGirl" type="Area2D" unique_id=869288979]
|
||||||
|
script = ExtResource("1_53v1e")
|
||||||
|
|
||||||
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1672878033]
|
||||||
|
sprite_frames = SubResource("SpriteFrames_73fnb")
|
||||||
|
animation = &"idle_glance"
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1190138841]
|
||||||
|
shape = SubResource("RectangleShape2D_53v1e")
|
||||||
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animation_finished"]
|
||||||
BIN
ArrowGirl/ArrowGirl.xcf
Normal file
BIN
ArrowGirl/ArrowGirl.xcf
Normal file
Binary file not shown.
@@ -40,7 +40,7 @@ func _physics_process(_delta) -> void:
|
|||||||
buffer_jumping -= 1
|
buffer_jumping -= 1
|
||||||
|
|
||||||
#process coyote and jump buffers
|
#process coyote and jump buffers
|
||||||
if buffer_grounded > 0 and buffer_jumping > 0:
|
if buffer_grounded > 0 and buffer_jumping > 0 and just_bounced == false:
|
||||||
velocity.y = -JUMP_FORCE
|
velocity.y = -JUMP_FORCE
|
||||||
buffer_grounded = 0
|
buffer_grounded = 0
|
||||||
buffer_jumping = 0
|
buffer_jumping = 0
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://dndbf44fkm2ww"]
|
[gd_scene format=3 uid="uid://dndbf44fkm2ww"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c2x51mppxugpn" path="res://BoxBoy/BoxBoy.gd" id="1_av86f"]
|
[ext_resource type="Script" uid="uid://c2x51mppxugpn" path="res://BoxBoy/BoxBoy.gd" id="1_av86f"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bpjhq0b2dae1d" path="res://BoxBoy/BoxBoy.png" id="2_0yqgk"]
|
[ext_resource type="Texture2D" uid="uid://bpjhq0b2dae1d" path="res://BoxBoy/BoxBoy.png" id="2_0yqgk"]
|
||||||
@@ -34,15 +34,15 @@ animations = [{
|
|||||||
radius = 14.0
|
radius = 14.0
|
||||||
height = 32.0
|
height = 32.0
|
||||||
|
|
||||||
[node name="BoxBoy" type="CharacterBody2D"]
|
[node name="BoxBoy" type="CharacterBody2D" unique_id=904940283]
|
||||||
script = ExtResource("1_av86f")
|
script = ExtResource("1_av86f")
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=660463739]
|
||||||
sprite_frames = SubResource("SpriteFrames_y2354")
|
sprite_frames = SubResource("SpriteFrames_y2354")
|
||||||
animation = &"idle"
|
animation = &"idle"
|
||||||
metadata/_edit_lock_ = true
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1250358515]
|
||||||
shape = SubResource("CapsuleShape2D_ulcgi")
|
shape = SubResource("CapsuleShape2D_ulcgi")
|
||||||
metadata/_edit_lock_ = true
|
metadata/_edit_lock_ = true
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://ddl0kxl0inw6r" path="res://Tileset/atlas.png" id="1_3253y"]
|
[ext_resource type="Texture2D" uid="uid://ddl0kxl0inw6r" path="res://Tileset/atlas.png" id="1_3253y"]
|
||||||
[ext_resource type="Script" uid="uid://b4nlbrxto0tjp" path="res://Controllers/GameplayController.gd" id="1_u3cyc"]
|
[ext_resource type="Script" uid="uid://b4nlbrxto0tjp" path="res://Controllers/GameplayController.gd" id="1_u3cyc"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dndbf44fkm2ww" path="res://BoxBoy/BoxBoy.tscn" id="2_3253y"]
|
[ext_resource type="PackedScene" uid="uid://dndbf44fkm2ww" path="res://BoxBoy/BoxBoy.tscn" id="2_3253y"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cn8srrkyt4h8e" path="res://ArrowGirl/ArrowGirl.tscn" id="4_m7jmp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b1hpr05b5sgww" path="res://Bouncy/Bouncy.tscn" id="4_u3cyc"]
|
[ext_resource type="PackedScene" uid="uid://b1hpr05b5sgww" path="res://Bouncy/Bouncy.tscn" id="4_u3cyc"]
|
||||||
|
|
||||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_u3cyc"]
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_u3cyc"]
|
||||||
@@ -58,3 +59,8 @@ position = Vector2(1584, -576)
|
|||||||
|
|
||||||
[node name="Bouncy6" parent="BouncyContainer" unique_id=2085472449 instance=ExtResource("4_u3cyc")]
|
[node name="Bouncy6" parent="BouncyContainer" unique_id=2085472449 instance=ExtResource("4_u3cyc")]
|
||||||
position = Vector2(1680, -896)
|
position = Vector2(1680, -896)
|
||||||
|
|
||||||
|
[node name="NPCContainer" type="Node" parent="." unique_id=1127671677]
|
||||||
|
|
||||||
|
[node name="ArrowGirl" parent="NPCContainer" unique_id=869288979 instance=ExtResource("4_m7jmp")]
|
||||||
|
position = Vector2(-24, 48)
|
||||||
@@ -15,7 +15,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="colorvania"
|
config/name="colorvania"
|
||||||
run/main_scene="res://scene.tscn"
|
run/main_scene="res://Scene.tscn"
|
||||||
config/features=PackedStringArray("4.6", "Forward Plus")
|
config/features=PackedStringArray("4.6", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user