collisions, enemies, knockback, rolling

This commit is contained in:
mightypanders
2021-04-04 19:20:44 +02:00
parent 650a5a4a83
commit 01490a7f01
14 changed files with 1306 additions and 17 deletions

View 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.

View 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"]