Compare commits
2 Commits
650a5a4a83
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
53db3d4f39 | ||
|
01490a7f01 |
@ -0,0 +1,3 @@
|
||||
source_md5="8081925e350ea64b72c72e48f0568d61"
|
||||
dest_md5="f38388566d7ce1734930f267c70a26ee"
|
||||
|
BIN
.import/grey_boxes.png-404c13d87c9ff0c57032acdd416832a4.stex
Normal file
BIN
.import/grey_boxes.png-404c13d87c9ff0c57032acdd416832a4.stex
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="83de8277d0c835db9cce93a1f9a9355d"
|
||||
dest_md5="2e07a8d84640e78ca4b6fd08b495987b"
|
||||
|
BIN
.import/grey_boxes.png-609d123c3363bafe71aa743833de87de.stex
Normal file
BIN
.import/grey_boxes.png-609d123c3363bafe71aa743833de87de.stex
Normal file
Binary file not shown.
1024
World.tscn
1024
World.tscn
File diff suppressed because it is too large
Load Diff
7
assets/Boxes/Hitbox.tscn
Normal file
7
assets/Boxes/Hitbox.tscn
Normal file
@ -0,0 +1,7 @@
|
||||
[gd_scene format=2]
|
||||
|
||||
[node name="Hitbox" type="Area2D"]
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
7
assets/Boxes/Hurtbox.tscn
Normal file
7
assets/Boxes/Hurtbox.tscn
Normal file
@ -0,0 +1,7 @@
|
||||
[gd_scene format=2]
|
||||
|
||||
[node name="Hurtbox" type="Area2D"]
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
12
assets/Effects/GrassEffect.gd
Normal file
12
assets/Effects/GrassEffect.gd
Normal file
@ -0,0 +1,12 @@
|
||||
extends Node2D
|
||||
|
||||
onready var animatedSprite = $AnimatedSprite
|
||||
func _ready():
|
||||
animatedSprite.frame = 0
|
||||
animatedSprite.play("Animate")
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_AnimatedSprite_animation_finished():
|
||||
queue_free()
|
||||
pass # Replace with function body.
|
43
assets/Effects/GrassEffect.tscn
Normal file
43
assets/Effects/GrassEffect.tscn
Normal file
@ -0,0 +1,43 @@
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Effects/GrassEffect.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/Effects/GrassEffect.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 96, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 128, 0, 32, 32 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=6]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ],
|
||||
"loop": false,
|
||||
"name": "Animate",
|
||||
"speed": 15.0
|
||||
} ]
|
||||
|
||||
[node name="GrassEffect" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 6 )
|
||||
animation = "Animate"
|
||||
frame = 4
|
||||
centered = false
|
||||
offset = Vector2( -8, -8 )
|
||||
[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_animation_finished"]
|
10
assets/Enemies/Bat.gd
Normal file
10
assets/Enemies/Bat.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
var knockback = Vector2.ZERO
|
||||
|
||||
func _physics_process(delta):
|
||||
knockback = knockback.move_toward(Vector2.ZERO,200*delta)
|
||||
knockback = move_and_slide(knockback)
|
||||
|
||||
func _on_Hurtbox_area_entered(area):
|
||||
knockback = area.knockbackvector * 120
|
68
assets/Enemies/Bat.tscn
Normal file
68
assets/Enemies/Bat.tscn
Normal file
@ -0,0 +1,68 @@
|
||||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Shadows/SmallShadow.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/Enemies/Bat.png" type="Texture" id=2]
|
||||
[ext_resource path="res://assets/Boxes/Hurtbox.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://assets/Enemies/Bat.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 0, 0, 16, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 16, 0, 16, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 32, 0, 16, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 48, 0, 16, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 2 )
|
||||
region = Rect2( 64, 0, 16, 24 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=6]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 10.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=7]
|
||||
radius = 3.91596
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=8]
|
||||
radius = 7.14859
|
||||
height = 4.89034
|
||||
|
||||
[node name="Bat" type="KinematicBody2D"]
|
||||
collision_layer = 16
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( -0.10413, -0.55414 )
|
||||
frames = SubResource( 6 )
|
||||
frame = 4
|
||||
playing = true
|
||||
offset = Vector2( 0, -12 )
|
||||
|
||||
[node name="Shadow" type="Sprite" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource( 7 )
|
||||
|
||||
[node name="Hurtbox" parent="." instance=ExtResource( 3 )]
|
||||
collision_layer = 8
|
||||
|
||||
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
|
||||
position = Vector2( 0.10511, -14.9259 )
|
||||
shape = SubResource( 8 )
|
||||
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
||||
|
||||
[editable path="Hurtbox"]
|
BIN
assets/Enemies/grey_boxes.png
Normal file
BIN
assets/Enemies/grey_boxes.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 828 B |
34
assets/Enemies/grey_boxes.png.import
Normal file
34
assets/Enemies/grey_boxes.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/grey_boxes.png-404c13d87c9ff0c57032acdd416832a4.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Enemies/grey_boxes.png"
|
||||
dest_files=[ "res://.import/grey_boxes.png-404c13d87c9ff0c57032acdd416832a4.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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
3
assets/Player/SwordHitbox.gd
Normal file
3
assets/Player/SwordHitbox.gd
Normal file
@ -0,0 +1,3 @@
|
||||
extends Area2D
|
||||
|
||||
var knockbackvector = Vector2.ZERO
|
10
assets/World/Grass.gd
Normal file
10
assets/World/Grass.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends Sprite
|
||||
onready var GrassEffect = load("res://assets/Effects/GrassEffect.tscn")
|
||||
func destroyGrass():
|
||||
var grassEffect = GrassEffect.instance()
|
||||
var world = get_tree().current_scene
|
||||
world.add_child(grassEffect)
|
||||
grassEffect.global_position = global_position
|
||||
queue_free()
|
||||
func _on_Hurtbox_area_entered(area):
|
||||
destroyGrass()
|
27
assets/World/Grass.tscn
Normal file
27
assets/World/Grass.tscn
Normal file
@ -0,0 +1,27 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://assets/World/Grass.png" type="Texture" id=1]
|
||||
[ext_resource path="res://assets/World/Grass.gd" type="Script" id=2]
|
||||
[ext_resource path="res://assets/Boxes/Hurtbox.tscn" type="PackedScene" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 6.51773, 6.19977 )
|
||||
|
||||
[node name="Grass" type="Node2D"]
|
||||
|
||||
[node name="Grass" type="Sprite" parent="."]
|
||||
position = Vector2( 0.0651245, 0.152679 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
offset = Vector2( -8, -8 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Hurtbox" parent="." instance=ExtResource( 3 )]
|
||||
collision_layer = 8
|
||||
|
||||
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
|
||||
position = Vector2( 7.94595, 7.94598 )
|
||||
shape = SubResource( 1 )
|
||||
[connection signal="area_entered" from="Hurtbox" to="Grass" method="_on_Hurtbox_area_entered"]
|
||||
|
||||
[editable path="Hurtbox"]
|
BIN
assets/World/grey_boxes.png
Normal file
BIN
assets/World/grey_boxes.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 823 B |
34
assets/World/grey_boxes.png.import
Normal file
34
assets/World/grey_boxes.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/grey_boxes.png-609d123c3363bafe71aa743833de87de.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/World/grey_boxes.png"
|
||||
dest_files=[ "res://.import/grey_boxes.png-609d123c3363bafe71aa743833de87de.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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
25
export_presets.cfg
Normal file
25
export_presets.cfg
Normal file
@ -0,0 +1,25 @@
|
||||
[preset.0]
|
||||
|
||||
name="Linux/X11"
|
||||
platform="Linux/X11"
|
||||
runnable=true
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../Exports/HeartBeast/HeartBesat.x86_64"
|
||||
patch_list=PoolStringArray( )
|
||||
script_export_mode=1
|
||||
script_encryption_key=""
|
||||
|
||||
[preset.0.options]
|
||||
|
||||
texture_format/bptc=false
|
||||
texture_format/s3tc=true
|
||||
texture_format/etc=false
|
||||
texture_format/etc2=false
|
||||
texture_format/no_bptc_fallbacks=true
|
||||
binary_format/64_bits=true
|
||||
binary_format/embed_pck=false
|
||||
custom_template/release=""
|
||||
custom_template/debug=""
|
@ -50,6 +50,51 @@ texture={
|
||||
"svg/scale": 1.0
|
||||
}
|
||||
|
||||
[input]
|
||||
|
||||
attack={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":74,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
roll={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
2d_physics/layer_1="World"
|
||||
2d_physics/layer_2="Player"
|
||||
2d_physics/layer_3="PlayerHurtbox"
|
||||
2d_physics/layer_4="EnemyHurtbox"
|
||||
2d_physics/layer_5="Enemy"
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_environment="res://default_env.tres"
|
||||
|
@ -1,27 +1,78 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
var velocity = Vector2.ZERO
|
||||
var roll_vector = Vector2.ZERO
|
||||
const MAX_SPEED = 80
|
||||
const ROLL_SPEED = MAX_SPEED*1.5
|
||||
const ACCELERATION = 500
|
||||
const FRICTION = 500
|
||||
|
||||
enum states{
|
||||
MOVE,
|
||||
ROLL,
|
||||
ATTACK
|
||||
}
|
||||
var state = states.MOVE
|
||||
|
||||
onready var animationPlayer = $AnimationPlayer
|
||||
onready var animationTree = $AnimationTree
|
||||
onready var animationState = animationTree.get('parameters/playback')
|
||||
onready var swordHitbox = $HitBoxPivot/SwordHitbox
|
||||
|
||||
func _ready():
|
||||
animationTree.active = true
|
||||
swordHitbox.knockbackvector = roll_vector
|
||||
func _physics_process(delta):
|
||||
match state:
|
||||
states.MOVE:
|
||||
do_move(delta)
|
||||
states.ATTACK:
|
||||
do_attack(delta)
|
||||
states.ROLL:
|
||||
do_roll(delta)
|
||||
|
||||
func do_roll(delta):
|
||||
animationState.travel('Roll')
|
||||
velocity = roll_vector * ROLL_SPEED
|
||||
move_sprite()
|
||||
pass
|
||||
func do_attack(_delta):
|
||||
animationState.travel('Attack')
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
func set_facing_direction(input_vector):
|
||||
animationTree.set("parameters/Walk/blend_position",input_vector)
|
||||
animationTree.set("parameters/Idle/blend_position",input_vector)
|
||||
animationTree.set("parameters/Attack/blend_position",input_vector)
|
||||
animationTree.set("parameters/Roll/blend_position",input_vector)
|
||||
|
||||
func do_move(delta):
|
||||
var input_vector=Vector2.ZERO
|
||||
input_vector.x = Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
|
||||
input_vector.y = Input.get_action_strength("ui_down") - Input.get_action_strength("ui_up")
|
||||
input_vector.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
|
||||
input_vector.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
|
||||
input_vector = input_vector.normalized()
|
||||
|
||||
if input_vector != Vector2.ZERO:
|
||||
animationTree.set("parameters/Walk/blend_position",input_vector)
|
||||
animationTree.set("parameters/Idle/blend_position",input_vector)
|
||||
roll_vector = input_vector
|
||||
swordHitbox.knockbackvector = roll_vector
|
||||
set_facing_direction(input_vector)
|
||||
animationState.travel("Walk")
|
||||
velocity = velocity.move_toward(input_vector*MAX_SPEED,ACCELERATION*delta)
|
||||
else:
|
||||
animationState.travel("Idle")
|
||||
velocity = velocity.move_toward(Vector2.ZERO, FRICTION*delta)
|
||||
velocity = move_and_slide(velocity)
|
||||
|
||||
move_sprite()
|
||||
if Input.is_action_just_pressed("attack"):
|
||||
state = states.ATTACK
|
||||
if Input.is_action_just_pressed('roll'):
|
||||
state = states.ROLL
|
||||
|
||||
func move_sprite():
|
||||
velocity = move_and_slide(velocity)
|
||||
func attack_animation_finished():
|
||||
state = states.MOVE
|
||||
|
||||
func roll_animation_finished():
|
||||
velocity = velocity / 2
|
||||
state = states.MOVE
|
||||
|
@ -1,11 +1,229 @@
|
||||
[gd_scene load_steps=28 format=2]
|
||||
[gd_scene load_steps=53 format=2]
|
||||
|
||||
[ext_resource path="res://assets/Player/Player.png" type="Texture" id=1]
|
||||
[ext_resource path="res://script/player/Player.gd" type="Script" id=2]
|
||||
[ext_resource path="res://assets/Boxes/Hitbox.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://assets/Player/SwordHitbox.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 4.32415
|
||||
height = 8.80055
|
||||
radius = 4.44617
|
||||
height = 4.64468
|
||||
|
||||
[sub_resource type="Animation" id=26]
|
||||
resource_name = "Attack_Down"
|
||||
length = 0.4
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 36, 37, 38, 39 ]
|
||||
}
|
||||
tracks/1/type = "method"
|
||||
tracks/1/path = NodePath(".")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0.4 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"method": "attack_animation_finished"
|
||||
} ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("HitBoxPivot:rotation_degrees")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ 90.0 ]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("HitBoxPivot/SwordHitbox/CollisionShape2D:disabled")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/keys = {
|
||||
"times": PoolRealArray( 0.1, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ false, true ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=27]
|
||||
resource_name = "Attack_Left"
|
||||
length = 0.4
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 32, 33, 34, 35 ]
|
||||
}
|
||||
tracks/1/type = "method"
|
||||
tracks/1/path = NodePath(".")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0.4 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"method": "attack_animation_finished"
|
||||
} ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("HitBoxPivot:rotation_degrees")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ 180.0 ]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("HitBoxPivot/SwordHitbox/CollisionShape2D:disabled")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/keys = {
|
||||
"times": PoolRealArray( 0.1, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ false, true ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=28]
|
||||
resource_name = "Attack_Right"
|
||||
length = 0.4
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 24, 25, 26, 27 ]
|
||||
}
|
||||
tracks/1/type = "method"
|
||||
tracks/1/path = NodePath(".")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0.4 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"method": "attack_animation_finished"
|
||||
} ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("HitBoxPivot:rotation_degrees")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ 0.0 ]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("HitBoxPivot/SwordHitbox/CollisionShape2D:disabled")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/keys = {
|
||||
"times": PoolRealArray( 0.1, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ false, true ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=29]
|
||||
resource_name = "Attack_Up"
|
||||
length = 0.4
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 28, 29, 30, 31 ]
|
||||
}
|
||||
tracks/1/type = "method"
|
||||
tracks/1/path = NodePath(".")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0.4 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"method": "attack_animation_finished"
|
||||
} ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("HitBoxPivot:rotation_degrees")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 0,
|
||||
"values": [ 270.0 ]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("HitBoxPivot/SwordHitbox/CollisionShape2D:disabled")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/keys = {
|
||||
"times": PoolRealArray( 0.1, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ false, true ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=8]
|
||||
resource_name = "Idle_Left"
|
||||
@ -74,6 +292,126 @@ tracks/0/keys = {
|
||||
"values": [ 18 ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=38]
|
||||
resource_name = "Roll_Down"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 55, 56, 57, 58, 59 ]
|
||||
}
|
||||
tracks/1/type = "method"
|
||||
tracks/1/path = NodePath(".")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0.5 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"method": "roll_animation_finished"
|
||||
} ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=39]
|
||||
resource_name = "Roll_Left"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 50, 51, 52, 53, 54 ]
|
||||
}
|
||||
tracks/1/type = "method"
|
||||
tracks/1/path = NodePath(".")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0.5 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"method": "roll_animation_finished"
|
||||
} ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=40]
|
||||
resource_name = "Roll_Right"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 40, 41, 42, 43, 44 ]
|
||||
}
|
||||
tracks/1/type = "method"
|
||||
tracks/1/path = NodePath(".")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0.5 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"method": "roll_animation_finished"
|
||||
} ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=41]
|
||||
resource_name = "Roll_Up"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 45, 46, 47, 48, 49 ]
|
||||
}
|
||||
tracks/1/type = "method"
|
||||
tracks/1/path = NodePath(".")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0.5 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"method": "roll_animation_finished"
|
||||
} ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
resource_name = "Walk_Down"
|
||||
length = 0.6
|
||||
@ -142,6 +480,31 @@ tracks/0/keys = {
|
||||
"values": [ 7, 8, 9, 10, 11, 6 ]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=30]
|
||||
animation = "Attack_Left"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=31]
|
||||
animation = "Attack_Down"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=32]
|
||||
animation = "Attack_Right"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=33]
|
||||
animation = "Attack_Up"
|
||||
|
||||
[sub_resource type="AnimationNodeBlendSpace2D" id=34]
|
||||
blend_point_0/node = SubResource( 30 )
|
||||
blend_point_0/pos = Vector2( -1, 0 )
|
||||
blend_point_1/node = SubResource( 31 )
|
||||
blend_point_1/pos = Vector2( 0, 1.1 )
|
||||
blend_point_2/node = SubResource( 32 )
|
||||
blend_point_2/pos = Vector2( 1, 0 )
|
||||
blend_point_3/node = SubResource( 33 )
|
||||
blend_point_3/pos = Vector2( 0, -1.1 )
|
||||
min_space = Vector2( -1, -1.1 )
|
||||
max_space = Vector2( 1, 1.1 )
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=10]
|
||||
animation = "Idle_down"
|
||||
|
||||
@ -171,6 +534,31 @@ min_space = Vector2( -1, -1.1 )
|
||||
max_space = Vector2( 1, 1.1 )
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=42]
|
||||
animation = "Roll_Down"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=43]
|
||||
animation = "Roll_Right"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=44]
|
||||
animation = "Roll_Up"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=45]
|
||||
animation = "Roll_Left"
|
||||
|
||||
[sub_resource type="AnimationNodeBlendSpace2D" id=46]
|
||||
blend_point_0/node = SubResource( 42 )
|
||||
blend_point_0/pos = Vector2( 0, 1.1 )
|
||||
blend_point_1/node = SubResource( 43 )
|
||||
blend_point_1/pos = Vector2( 1, 0 )
|
||||
blend_point_2/node = SubResource( 44 )
|
||||
blend_point_2/pos = Vector2( 0, -1.1 )
|
||||
blend_point_3/node = SubResource( 45 )
|
||||
blend_point_3/pos = Vector2( -1, 0 )
|
||||
min_space = Vector2( -1, -1.1 )
|
||||
max_space = Vector2( 1, 1.1 )
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id=19]
|
||||
animation = "Walk_Down"
|
||||
|
||||
@ -200,40 +588,64 @@ blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id=25]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id=35]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id=36]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id=47]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id=48]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id=16]
|
||||
states/Attack/node = SubResource( 34 )
|
||||
states/Attack/position = Vector2( 567, 254 )
|
||||
states/Idle/node = SubResource( 15 )
|
||||
states/Idle/position = Vector2( 629, 126 )
|
||||
states/Roll/node = SubResource( 46 )
|
||||
states/Roll/position = Vector2( 841, 254 )
|
||||
states/Walk/node = SubResource( 23 )
|
||||
states/Walk/position = Vector2( 807, 126 )
|
||||
transitions = [ "Idle", "Walk", SubResource( 24 ), "Walk", "Idle", SubResource( 25 ) ]
|
||||
states/Walk/position = Vector2( 880, 58 )
|
||||
transitions = [ "Idle", "Walk", SubResource( 24 ), "Walk", "Idle", SubResource( 25 ), "Idle", "Attack", SubResource( 35 ), "Attack", "Idle", SubResource( 36 ), "Idle", "Roll", SubResource( 47 ), "Roll", "Idle", SubResource( 48 ) ]
|
||||
start_node = "Idle"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=17]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=18]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=37]
|
||||
radius = 11.5633
|
||||
height = 8.25464
|
||||
|
||||
[node name="Player" type="KinematicBody2D"]
|
||||
z_index = 1
|
||||
collision_layer = 2
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 0, -8.04334 )
|
||||
texture = ExtResource( 1 )
|
||||
hframes = 60
|
||||
frame = 18
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( -1.41422, 0.440334 )
|
||||
position = Vector2( 0, 0.756 )
|
||||
rotation = -1.5708
|
||||
scale = Vector2( 1.05118, 1.04034 )
|
||||
shape = SubResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/Attack_Down = SubResource( 26 )
|
||||
anims/Attack_Left = SubResource( 27 )
|
||||
anims/Attack_Right = SubResource( 28 )
|
||||
anims/Attack_Up = SubResource( 29 )
|
||||
anims/Idle_Left = SubResource( 8 )
|
||||
anims/Idle_Right = SubResource( 2 )
|
||||
anims/Idle_Up = SubResource( 3 )
|
||||
anims/Idle_down = SubResource( 9 )
|
||||
anims/Roll_Down = SubResource( 38 )
|
||||
anims/Roll_Left = SubResource( 39 )
|
||||
anims/Roll_Right = SubResource( 40 )
|
||||
anims/Roll_Up = SubResource( 41 )
|
||||
anims/Walk_Down = SubResource( 4 )
|
||||
anims/Walk_Left = SubResource( 5 )
|
||||
anims/Walk_Right = SubResource( 6 )
|
||||
@ -242,8 +654,25 @@ anims/Walk_Up = SubResource( 7 )
|
||||
[node name="AnimationTree" type="AnimationTree" parent="."]
|
||||
tree_root = SubResource( 16 )
|
||||
anim_player = NodePath("../AnimationPlayer")
|
||||
active = true
|
||||
parameters/playback = SubResource( 17 )
|
||||
parameters/Idle/blend_position = Vector2( 0, 0 )
|
||||
parameters/Attack/blend_position = Vector2( 0.008641, 0.490582 )
|
||||
parameters/Idle/blend_position = Vector2( -0.000777006, -0.00897956 )
|
||||
parameters/Idle/4/playback = SubResource( 18 )
|
||||
parameters/Roll/blend_position = Vector2( -0.0016892, -0.00504589 )
|
||||
parameters/Walk/blend_position = Vector2( 0, 0 )
|
||||
|
||||
[node name="HitBoxPivot" type="Position2D" parent="."]
|
||||
position = Vector2( 0, -4 )
|
||||
rotation = 3.14159
|
||||
|
||||
[node name="SwordHitbox" parent="HitBoxPivot" instance=ExtResource( 3 )]
|
||||
position = Vector2( 14.5055, 1.68754 )
|
||||
collision_mask = 8
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="CollisionShape2D" parent="HitBoxPivot/SwordHitbox" index="0"]
|
||||
position = Vector2( 0, -2.207 )
|
||||
shape = SubResource( 37 )
|
||||
disabled = true
|
||||
|
||||
[editable path="HitBoxPivot/SwordHitbox"]
|
||||
|
Loading…
Reference in New Issue
Block a user