fromage de la baguette
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
class_name AITemplate
 | 
					class_name AITemplate
 | 
				
			||||||
extends Node
 | 
					extends Node
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func run(position, enemyPosition) -> Vector2:
 | 
					func getDirection(position, enemyPosition) -> Vector2:
 | 
				
			||||||
	return Vector2.ZERO
 | 
						return Vector2.ZERO
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,5 +10,8 @@ speed = 100.0
 | 
				
			|||||||
damage = 1
 | 
					damage = 1
 | 
				
			||||||
priority = 1
 | 
					priority = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[node name="AnimatedSprite2D" parent="." index="0"]
 | 
				
			||||||
 | 
					frame_progress = 0.482614
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[node name="AI" parent="." index="3"]
 | 
					[node name="AI" parent="." index="3"]
 | 
				
			||||||
script = ExtResource("2_x3ldf")
 | 
					script = ExtResource("2_x3ldf")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,6 +20,7 @@ var cooldown : float = 0
 | 
				
			|||||||
func _ready():
 | 
					func _ready():
 | 
				
			||||||
	enemy = get_node("../Enemy")
 | 
						enemy = get_node("../Enemy")
 | 
				
			||||||
	currentHp = maxHp
 | 
						currentHp = maxHp
 | 
				
			||||||
 | 
						animatedSprite.play("default")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func _process(delta):
 | 
					func _process(delta):
 | 
				
			||||||
	if !isAlive:
 | 
						if !isAlive:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -150,7 +150,7 @@ animations = [{
 | 
				
			|||||||
"duration": 1.0,
 | 
					"duration": 1.0,
 | 
				
			||||||
"texture": SubResource("AtlasTexture_bxitd")
 | 
					"texture": SubResource("AtlasTexture_bxitd")
 | 
				
			||||||
}],
 | 
					}],
 | 
				
			||||||
"loop": false,
 | 
					"loop": true,
 | 
				
			||||||
"name": &"attack",
 | 
					"name": &"attack",
 | 
				
			||||||
"speed": 12.0
 | 
					"speed": 12.0
 | 
				
			||||||
}, {
 | 
					}, {
 | 
				
			||||||
@@ -185,7 +185,7 @@ animations = [{
 | 
				
			|||||||
"duration": 1.0,
 | 
					"duration": 1.0,
 | 
				
			||||||
"texture": SubResource("AtlasTexture_7bunh")
 | 
					"texture": SubResource("AtlasTexture_7bunh")
 | 
				
			||||||
}],
 | 
					}],
 | 
				
			||||||
"loop": false,
 | 
					"loop": true,
 | 
				
			||||||
"name": &"death",
 | 
					"name": &"death",
 | 
				
			||||||
"speed": 12.0
 | 
					"speed": 12.0
 | 
				
			||||||
}, {
 | 
					}, {
 | 
				
			||||||
@@ -234,6 +234,7 @@ script = ExtResource("1_rkej7")
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
 | 
					[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
 | 
				
			||||||
sprite_frames = SubResource("SpriteFrames_k6v1d")
 | 
					sprite_frames = SubResource("SpriteFrames_k6v1d")
 | 
				
			||||||
 | 
					frame_progress = 0.107531
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[node name="BodyCollision" type="CollisionShape2D" parent="."]
 | 
					[node name="BodyCollision" type="CollisionShape2D" parent="."]
 | 
				
			||||||
rotation = 1.5708
 | 
					rotation = 1.5708
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@ func _process(delta):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func _on_start_button_pressed():
 | 
					func _on_start_button_pressed():
 | 
				
			||||||
	get_tree().change_scene_to_file("res://Scenes/Levels/level1.tscn")
 | 
						get_tree().change_scene_to_file("res://Scenes/Levels/level_1.tscn")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func _on_quit_button_pressed():
 | 
					func _on_quit_button_pressed():
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user