update obstacle NPCs (Cirno + Sanae)
This commit is contained in:
parent
aa5abc16b5
commit
81009436c0
15 changed files with 188 additions and 82 deletions
|
@ -1,5 +1,15 @@
|
|||
extends NPCExample
|
||||
|
||||
|
||||
func _ready():
|
||||
._ready()
|
||||
facing = Constants.Direction.LEFT
|
||||
|
||||
func before_tick():
|
||||
pass
|
||||
|
||||
func reset_current_action():
|
||||
# process CURRENT_ACTION
|
||||
if get_current_action() == Constants.UnitCurrentAction.JUMPING:
|
||||
if not actions[Constants.ActionType.JUMP]:
|
||||
set_current_action(Constants.UnitCurrentAction.IDLE)
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://Units/DownhillAutoscrollerNPC.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Graphics/Units/NPC.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Graphics/Animations/NPCWalk.tres" type="SpriteFrames" id=3]
|
||||
[ext_resource path="res://Graphics/Units/NPCJump2.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Graphics/Units/NPCJump1.png" type="Texture" id=5]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 6, 14 )
|
||||
|
||||
[node name="NPC" type="Area2D"]
|
||||
collision_mask = 2
|
||||
script = ExtResource( 1 )
|
||||
unit_type = 1
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, -14 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Idle" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 2 )
|
||||
offset = Vector2( 0, -15 )
|
||||
|
||||
[node name="Jump1" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 5 )
|
||||
offset = Vector2( 0, -15 )
|
||||
|
||||
[node name="Jump2" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 4 )
|
||||
offset = Vector2( 0, -15 )
|
||||
|
||||
[node name="Walk" type="AnimatedSprite" parent="."]
|
||||
visible = false
|
||||
frames = ExtResource( 3 )
|
||||
offset = Vector2( 0, -15 )
|
21
Units/DownhillAutoscrollerNPCCirno.tscn
Normal file
21
Units/DownhillAutoscrollerNPCCirno.tscn
Normal file
|
@ -0,0 +1,21 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Units/DownhillAutoscrollerNPC.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Graphics/Units/Freestanding_Cirno.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 8, 36 )
|
||||
|
||||
[node name="NPC" type="Area2D"]
|
||||
collision_mask = 2
|
||||
script = ExtResource( 1 )
|
||||
unit_type = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, -36 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Idle" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 2 )
|
||||
offset = Vector2( 0, -48 )
|
21
Units/DownhillAutoscrollerNPCSanae.tscn
Normal file
21
Units/DownhillAutoscrollerNPCSanae.tscn
Normal file
|
@ -0,0 +1,21 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Units/DownhillAutoscrollerNPC.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Graphics/Units/Freestanding_Sanae.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 8, 36 )
|
||||
|
||||
[node name="NPC" type="Area2D"]
|
||||
collision_mask = 2
|
||||
script = ExtResource( 1 )
|
||||
unit_type = 3
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, -36 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Idle" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 2 )
|
||||
offset = Vector2( 0, -48 )
|
|
@ -1,11 +1,12 @@
|
|||
[gd_scene load_steps=8 format=2]
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://Scripts/Units/NPCUnit.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Graphics/Units/Letty/Move0.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Graphics/Units/Letty/Move-1.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Graphics/Units/Letty/Move+2.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Graphics/Units/Letty/Move+2.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Graphics/Units/Letty/Move-2.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Graphics/Units/Letty/Move+1.png" type="Texture" id=5]
|
||||
[ext_resource path="res://Graphics/Units/Letty/Move-2.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Graphics/Units/Mystia/Move0.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Graphics/Units/Letty/Move-1.png" type="Texture" id=7]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 9, 34 )
|
||||
|
@ -14,7 +15,7 @@ extents = Vector2( 9, 34 )
|
|||
z_index = 1
|
||||
collision_layer = 0
|
||||
script = ExtResource( 1 )
|
||||
unit_type = 2
|
||||
unit_type = 1
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, -36 )
|
||||
|
@ -22,7 +23,7 @@ shape = SubResource( 1 )
|
|||
|
||||
[node name="Idle" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 2 )
|
||||
texture = ExtResource( 6 )
|
||||
offset = Vector2( 0, -48 )
|
||||
|
||||
[node name="Move0" type="Sprite" parent="."]
|
||||
|
@ -37,19 +38,17 @@ offset = Vector2( 0, -48 )
|
|||
|
||||
[node name="Move+2" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 4 )
|
||||
texture = ExtResource( 3 )
|
||||
offset = Vector2( 0, -48 )
|
||||
|
||||
[node name="Move-1" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 3 )
|
||||
texture = ExtResource( 7 )
|
||||
offset = Vector2( 0, -48 )
|
||||
|
||||
[node name="Move-2" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 6 )
|
||||
texture = ExtResource( 4 )
|
||||
offset = Vector2( 0, -48 )
|
||||
script = ExtResource( 1 )
|
||||
unit_type = 2
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_Player_area_entered"]
|
|
@ -14,7 +14,7 @@ extents = Vector2( 9, 34 )
|
|||
z_index = 1
|
||||
collision_layer = 0
|
||||
script = ExtResource( 1 )
|
||||
unit_type = 2
|
||||
unit_type = 1
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, -36 )
|
Loading…
Add table
Add a link
Reference in a new issue