Respawn workss
This commit is contained in:
parent
fa8cee351e
commit
9ed1eba3fb
|
@ -4,7 +4,7 @@ var position: Vector2 = Vector2()
|
||||||
var health = null
|
var health = null
|
||||||
var energy = null
|
var energy = null
|
||||||
var unlocked: Array = []
|
var unlocked: Array = []
|
||||||
var current_scene: String
|
var current_scene: String setget set_scene
|
||||||
|
|
||||||
func respawn():
|
func respawn():
|
||||||
health = null
|
health = null
|
||||||
|
@ -13,3 +13,6 @@ func respawn():
|
||||||
func reset_magic():
|
func reset_magic():
|
||||||
unlocked = []
|
unlocked = []
|
||||||
|
|
||||||
|
func set_scene(new):
|
||||||
|
print(new)
|
||||||
|
current_scene = new
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
[ext_resource path="res://Music and Fonts(Misc.)/Hell Hit.tres" type="Animation" id=3]
|
[ext_resource path="res://Music and Fonts(Misc.)/Hell Hit.tres" type="Animation" id=3]
|
||||||
[ext_resource path="res://Music and Fonts(Misc.)/Ogre Hit.tres" type="Animation" id=4]
|
[ext_resource path="res://Music and Fonts(Misc.)/Ogre Hit.tres" type="Animation" id=4]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 5.06709, 5.78183 )
|
extents = Vector2( 5.06709, 5.78183 )
|
||||||
|
|
||||||
|
@ -26,7 +24,7 @@ tracks/0/keys = {
|
||||||
"values": [ 1, 2, 3, 4, 5, 6, 7 ]
|
"values": [ 1, 2, 3, 4, 5, 6, 7 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="KinematicBody2D" type="KinematicBody2D"]
|
[node name="Demon" type="KinematicBody2D"]
|
||||||
collision_layer = 4
|
collision_layer = 4
|
||||||
collision_mask = 11
|
collision_mask = 11
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
extends Enemy
|
extends Enemy
|
||||||
|
|
||||||
var Hell_Projectile = preload("res://ai/BadFireball.tscn")
|
var Hell_Projectile = preload("res://ai/Scenes/DemonFireball.tscn")
|
||||||
|
|
||||||
onready var ShootDelay : Timer = $ShootDelay
|
onready var ShootDelay : Timer = $ShootDelay
|
||||||
onready var ProjectileSpawn: Node2D = $Position2D
|
onready var ProjectileSpawn: Node2D = $Position2D
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
[gd_scene load_steps=4 format=2]
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://meta/DungeonTilemap.tres" type="TileSet" id=1]
|
[ext_resource path="res://meta/DungeonTilemap.tres" type="TileSet" id=1]
|
||||||
[ext_resource path="res://art/Paralax Dungeon.png" type="Texture" id=2]
|
[ext_resource path="res://art/Paralax Dungeon.png" type="Texture" id=2]
|
||||||
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=3]
|
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=3]
|
||||||
|
[ext_resource path="res://ai/Scenes/Demon.tscn" type="PackedScene" id=4]
|
||||||
|
|
||||||
[node name="Level 1" type="Node"]
|
[node name="Level 1" type="Node"]
|
||||||
|
|
||||||
|
@ -25,3 +26,6 @@ centered = false
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource( 3 )]
|
[node name="Player" parent="." instance=ExtResource( 3 )]
|
||||||
position = Vector2( 92.1555, 139.436 )
|
position = Vector2( 92.1555, 139.436 )
|
||||||
|
|
||||||
|
[node name="Demon" parent="." instance=ExtResource( 4 )]
|
||||||
|
position = Vector2( 301, 164 )
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
[ext_resource path="res://art/Mana.png" type="Texture" id=12]
|
[ext_resource path="res://art/Mana.png" type="Texture" id=12]
|
||||||
[ext_resource path="res://objects/Door.tscn" type="PackedScene" id=13]
|
[ext_resource path="res://objects/Door.tscn" type="PackedScene" id=13]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 169.977, 24.8286 )
|
extents = Vector2( 169.977, 24.8286 )
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue