mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-14 22:32:24 +02:00
Buug Fixes
Maybe Destroyed on last merge
This commit is contained in:
@@ -21,7 +21,6 @@ tracks/0/keys = {
|
|||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
vframes = 3
|
vframes = 3
|
||||||
hframes = 3
|
hframes = 3
|
||||||
frame = 8
|
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
autoplay = "__INIT__"
|
autoplay = "__INIT__"
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ func _physics_process(delta):
|
|||||||
moveState.HIT:
|
moveState.HIT:
|
||||||
movement_hit()
|
movement_hit()
|
||||||
|
|
||||||
$"Effects/HealEffect".emitting = heal_per_second > 0
|
|
||||||
elif movementState == moveState.ROLL:
|
elif movementState == moveState.ROLL:
|
||||||
movement_roll()
|
movement_roll()
|
||||||
elif movementState == moveState.HIT:
|
elif movementState == moveState.HIT:
|
||||||
@@ -75,6 +74,7 @@ func _physics_process(delta):
|
|||||||
movement_idle()
|
movement_idle()
|
||||||
else:
|
else:
|
||||||
movement_run(Vector2(0,0), delta)
|
movement_run(Vector2(0,0), delta)
|
||||||
|
$"Effects/HealEffect".emitting = heal_per_second > 0
|
||||||
makeMove(delta)
|
makeMove(delta)
|
||||||
move()
|
move()
|
||||||
|
|
||||||
@@ -85,18 +85,10 @@ func move():
|
|||||||
move_and_slide(velocity)
|
move_and_slide(velocity)
|
||||||
|
|
||||||
|
|
||||||
func set_animation_tree_vector():
|
|
||||||
animation_tree.set("parameters/idle/blend_position", rollvector)
|
|
||||||
animation_tree.set("parameters/hit/blend_position", rollvector)
|
|
||||||
animation_tree.set("parameters/roll/blend_position", rollvector)
|
|
||||||
animation_tree.set("parameters/run/blend_position", rollvector)
|
|
||||||
|
|
||||||
|
|
||||||
# API Interface for ai_hero
|
# API Interface for ai_hero
|
||||||
func attac(direction, delta):
|
func attac(direction, delta):
|
||||||
direction = direction.normalized()
|
direction = direction.normalized()
|
||||||
rollvector = direction
|
rollvector = direction
|
||||||
set_animation_tree_vector()
|
|
||||||
movementState = moveState.HIT
|
movementState = moveState.HIT
|
||||||
|
|
||||||
|
|
||||||
@@ -104,7 +96,6 @@ func attac(direction, delta):
|
|||||||
func roll(direction, delta):
|
func roll(direction, delta):
|
||||||
direction = direction.normalized()
|
direction = direction.normalized()
|
||||||
rollvector = direction
|
rollvector = direction
|
||||||
set_animation_tree_vector()
|
|
||||||
movementState = moveState.ROLL
|
movementState = moveState.ROLL
|
||||||
|
|
||||||
|
|
||||||
@@ -112,14 +103,13 @@ func roll(direction, delta):
|
|||||||
func run(direction, delta):
|
func run(direction, delta):
|
||||||
direction = direction.normalized()
|
direction = direction.normalized()
|
||||||
rollvector = direction
|
rollvector = direction
|
||||||
set_animation_tree_vector()
|
|
||||||
movementState = moveState.MOVE
|
movementState = moveState.MOVE
|
||||||
velocity = velocity.move_toward(player_stats.speed * rollvector, ACCELERATION * delta)
|
velocity = velocity.move_toward(player_stats.speed * rollvector, ACCELERATION * delta)
|
||||||
|
|
||||||
if direction == Vector2.ZERO:
|
if direction == Vector2.ZERO:
|
||||||
animation_state.travel("idle")
|
animation_state.change_state("idle")
|
||||||
else:
|
else:
|
||||||
animation_state.travel("run")
|
animation_state.change_state("run")
|
||||||
|
|
||||||
|
|
||||||
func movement_move(delta):
|
func movement_move(delta):
|
||||||
@@ -139,7 +129,6 @@ func movement_move(delta):
|
|||||||
velocity = Vector2.ZERO
|
velocity = Vector2.ZERO
|
||||||
else:
|
else:
|
||||||
rollvector = input_vector
|
rollvector = input_vector
|
||||||
set_animation_tree_vector()
|
|
||||||
animation_state.change_state("run")
|
animation_state.change_state("run")
|
||||||
velocity = velocity.move_toward(player_stats.speed * input_vector, ACCELERATION * delta)
|
velocity = velocity.move_toward(player_stats.speed * input_vector, ACCELERATION * delta)
|
||||||
if Input.is_action_just_pressed("roll"):
|
if Input.is_action_just_pressed("roll"):
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=57 format=2]
|
[gd_scene load_steps=63 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Player/Player.gd" type="Script" id=1]
|
[ext_resource path="res://Player/Player.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Player/player.png" type="Texture" id=2]
|
[ext_resource path="res://Player/player.png" type="Texture" id=2]
|
||||||
@@ -6,13 +6,13 @@
|
|||||||
[ext_resource path="res://Overlap/HurtHit_Box/Hitbox.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://Overlap/HurtHit_Box/Hitbox.tscn" type="PackedScene" id=4]
|
||||||
[ext_resource path="res://Overlap/Stats/Stats.tscn" type="PackedScene" id=5]
|
[ext_resource path="res://Overlap/Stats/Stats.tscn" type="PackedScene" id=5]
|
||||||
[ext_resource path="res://Fonts/Harmonic/Harmonic.ttf" type="DynamicFontData" id=6]
|
[ext_resource path="res://Fonts/Harmonic/Harmonic.ttf" type="DynamicFontData" id=6]
|
||||||
[ext_resource path="res://Effects/Heal/HealEffect.tscn" type="PackedScene" id=7]
|
[ext_resource path="res://Overlap/Kind.tscn" type="PackedScene" id=7]
|
||||||
|
[ext_resource path="res://Effects/Heal/HealEffect.tscn" type="PackedScene" id=8]
|
||||||
[ext_resource path="res://Player/States/Idle.gd" type="Script" id=12]
|
[ext_resource path="res://Player/States/Idle.gd" type="Script" id=12]
|
||||||
[ext_resource path="res://Player/States/Run.gd" type="Script" id=13]
|
[ext_resource path="res://Player/States/Run.gd" type="Script" id=13]
|
||||||
[ext_resource path="res://Player/States/Attack.gd" type="Script" id=14]
|
[ext_resource path="res://Player/States/Attack.gd" type="Script" id=14]
|
||||||
[ext_resource path="res://Player/PlayerStateMachine.gd" type="Script" id=15]
|
[ext_resource path="res://Player/PlayerStateMachine.gd" type="Script" id=15]
|
||||||
[ext_resource path="res://Player/States/Roll.gd" type="Script" id=16]
|
[ext_resource path="res://Player/States/Roll.gd" type="Script" id=16]
|
||||||
[ext_resource path="res://Overlap/Kind.tscn" type="PackedScene" id=7]
|
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id=1]
|
[sub_resource type="CapsuleShape2D" id=1]
|
||||||
radius = 2.15976
|
radius = 2.15976
|
||||||
@@ -626,11 +626,8 @@ font_data = ExtResource( 6 )
|
|||||||
|
|
||||||
[node name="Player" type="KinematicBody2D"]
|
[node name="Player" type="KinematicBody2D"]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
debug = null
|
|
||||||
ROLL_SPEED = null
|
|
||||||
FRICTION = 270
|
FRICTION = 270
|
||||||
title_scene = "res://Menus/TitleScreen/TitleScreen.tscn"
|
title_scene = "res://Menus/TitleScreen/TitleScreen.tscn"
|
||||||
ACCELERATION = null
|
|
||||||
|
|
||||||
[node name="Kind" parent="." instance=ExtResource( 7 )]
|
[node name="Kind" parent="." instance=ExtResource( 7 )]
|
||||||
kind = 1
|
kind = 1
|
||||||
@@ -743,7 +740,7 @@ script = ExtResource( 16 )
|
|||||||
|
|
||||||
[node name="Effects" type="Node2D" parent="."]
|
[node name="Effects" type="Node2D" parent="."]
|
||||||
|
|
||||||
[node name="HealEffect" parent="Effects" instance=ExtResource( 7 )]
|
[node name="HealEffect" parent="Effects" instance=ExtResource( 8 )]
|
||||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||||
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
||||||
[connection signal="area_exited" from="Hurtbox" to="." method="_on_Hurtbox_area_exited"]
|
[connection signal="area_exited" from="Hurtbox" to="." method="_on_Hurtbox_area_exited"]
|
||||||
|
|||||||
@@ -4,13 +4,8 @@
|
|||||||
[ext_resource path="res://World.gd" type="Script" id=2]
|
[ext_resource path="res://World.gd" type="Script" id=2]
|
||||||
[ext_resource path="res://Maps/Tilesets/Room/tileset_room.tres" type="TileSet" id=3]
|
[ext_resource path="res://Maps/Tilesets/Room/tileset_room.tres" type="TileSet" id=3]
|
||||||
[ext_resource path="res://testSprites/dark.png" type="Texture" id=4]
|
[ext_resource path="res://testSprites/dark.png" type="Texture" id=4]
|
||||||
[ext_resource path="res://Objects/Traps/Bear.tscn" type="PackedScene" id=5]
|
|
||||||
[ext_resource path="res://Objects/Banana/Banana.tscn" type="PackedScene" id=6]
|
|
||||||
[ext_resource path="res://Objects/Bonfire/Bonfire.tscn" type="PackedScene" id=7]
|
[ext_resource path="res://Objects/Bonfire/Bonfire.tscn" type="PackedScene" id=7]
|
||||||
[ext_resource path="res://Boss/Boss_template.tscn" type="PackedScene" id=17]
|
[ext_resource path="res://Boss/Boss_template.tscn" type="PackedScene" id=17]
|
||||||
[ext_resource path="res://Boss/SlimeBoss/SlimeBoss.tscn" type="PackedScene" id=18]
|
|
||||||
[ext_resource path="res://Menus/DialogueBox/DialogueBox.tscn" type="PackedScene" id=19]
|
|
||||||
[ext_resource path="res://Menus/DragNDrop/DragNDropUI.tscn" type="PackedScene" id=20]
|
|
||||||
[ext_resource path="res://Maps/Grid.tscn" type="PackedScene" id=21]
|
[ext_resource path="res://Maps/Grid.tscn" type="PackedScene" id=21]
|
||||||
|
|
||||||
[node name="World" type="Node2D"]
|
[node name="World" type="Node2D"]
|
||||||
@@ -39,7 +34,8 @@ position = Vector2( 152, 120 )
|
|||||||
[node name="Player" parent="YSort" instance=ExtResource( 1 )]
|
[node name="Player" parent="YSort" instance=ExtResource( 1 )]
|
||||||
position = Vector2( 176, 112 )
|
position = Vector2( 176, 112 )
|
||||||
scale = Vector2( 2, 2 )
|
scale = Vector2( 2, 2 )
|
||||||
FRICTION = null
|
debug = true
|
||||||
|
FRICTION = 200
|
||||||
|
|
||||||
[node name="Bonfire" parent="YSort" instance=ExtResource( 7 )]
|
[node name="Bonfire" parent="YSort" instance=ExtResource( 7 )]
|
||||||
position = Vector2( 296, -16 )
|
position = Vector2( 296, -16 )
|
||||||
@@ -47,4 +43,4 @@ position = Vector2( 296, -16 )
|
|||||||
[node name="Boss_template2" parent="YSort" instance=ExtResource( 17 )]
|
[node name="Boss_template2" parent="YSort" instance=ExtResource( 17 )]
|
||||||
position = Vector2( -40, 16 )
|
position = Vector2( -40, 16 )
|
||||||
|
|
||||||
[node name="Grid" parent="." instance=ExtResource( 18 )]
|
[node name="Grid" parent="." instance=ExtResource( 21 )]
|
||||||
|
|||||||
Reference in New Issue
Block a user