mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-11 21:22:22 +02:00
BIN
dist/bosskeeper.exe
vendored
Normal file
BIN
dist/bosskeeper.exe
vendored
Normal file
Binary file not shown.
BIN
dist/bosskeeper.pck
vendored
Normal file
BIN
dist/bosskeeper.pck
vendored
Normal file
Binary file not shown.
@@ -72,5 +72,4 @@ animations = [ {
|
||||
[node name="Background" type="AnimatedSprite"]
|
||||
frames = SubResource( 1 )
|
||||
frame = 42
|
||||
playing = true
|
||||
centered = false
|
||||
|
||||
@@ -4,23 +4,16 @@ var _dialogues = []
|
||||
|
||||
func _ready():
|
||||
_dialogues.append([
|
||||
"Hero;I... I... I need to go pee",
|
||||
"Boss;After this you won't need to pee ever again!",
|
||||
"More text...............",
|
||||
"Even more text................",
|
||||
".................................",
|
||||
".........................",
|
||||
"...................",
|
||||
"...",
|
||||
"We're done here."
|
||||
"Hero: I... I... I need to go pee",
|
||||
"Boss: After this you won't need to pee ever again!"
|
||||
])
|
||||
_dialogues.append([
|
||||
"Hero;I've come to slay you, you beast!",
|
||||
"Boss;Well then... step forward!"
|
||||
"Hero: I've come to slay you, you beast!",
|
||||
"Boss: Well then... step forward!"
|
||||
])
|
||||
_dialogues.append([
|
||||
"Hero;You've killed so many, but you won't kill me!",
|
||||
"Boss;We'll see about that!"
|
||||
"Hero: You've killed so many, but you won't kill me!",
|
||||
"Boss: We'll see about that!"
|
||||
])
|
||||
|
||||
func get_dialogue(id):
|
||||
|
||||
@@ -1,49 +1,55 @@
|
||||
extends Control
|
||||
|
||||
var usedCards = [cards.BARREL,cards.BEAR,cards.EMPTY,cards.EMPTY,cards.EMPTY]
|
||||
onready var HBox = $HBoxContainer
|
||||
var cardPositions = [Vector2(10,223), Vector2(65,223), Vector2(120,223), Vector2(175,223), Vector2(230, 223)]
|
||||
|
||||
enum cards {
|
||||
BANANA,
|
||||
BARRIERE,
|
||||
BARREL,
|
||||
SLIME,
|
||||
TORCH,
|
||||
BEAR,
|
||||
FLAME,
|
||||
SPIKE,
|
||||
SLIME,
|
||||
EMPTY
|
||||
}
|
||||
|
||||
func _ready():
|
||||
update_cards()
|
||||
pass
|
||||
|
||||
export var ObjectParent:NodePath
|
||||
|
||||
func update_cards():
|
||||
for child in HBox.get_children():
|
||||
child.queue_free()
|
||||
|
||||
for card in usedCards:
|
||||
var newchild
|
||||
match card:
|
||||
var index = 0
|
||||
while index < 5 and usedCards[index] != cards.EMPTY:
|
||||
index += 1
|
||||
var newchild = []
|
||||
for card in range(index):
|
||||
match usedCards[card]:
|
||||
cards.BANANA:
|
||||
newchild=load("res://Objects/Banana/BananaCard.tscn").instance()
|
||||
newchild.append(load("res://Objects/Banana/BananaCard.tscn").instance())
|
||||
cards.BARRIERE:
|
||||
newchild=(load("res://Objects/Barriere/BarrierCard.tscn").instance())
|
||||
newchild.append(load("res://Objects/Barriere/BarrierCard.tscn").instance())
|
||||
cards.BARREL:
|
||||
newchild=(load("res://Objects/Barrel/BarrelCard.tscn").instance())
|
||||
newchild.append(load("res://Objects/Barrel/BarrelCard.tscn").instance())
|
||||
cards.TORCH:
|
||||
newchild=(load("res://Objects/Torch/TorchCard.tscn").instance())
|
||||
newchild.append(load("res://Objects/Torch/TorchCard.tscn").instance())
|
||||
cards.BEAR:
|
||||
newchild=(load("res://Objects/Traps/Bear/BearCard.tscn").instance())
|
||||
newchild.append(load("res://Objects/Traps/Bear/BearCard.tscn").instance())
|
||||
cards.FLAME:
|
||||
newchild=(load("res://Objects/Traps/Flame/FlameCard.tscn").instance())
|
||||
newchild.append(load("res://Objects/Traps/Flame/FlameCard.tscn").instance())
|
||||
cards.SPIKE:
|
||||
newchild=(load("res://Objects/Traps/Spike/SpikeCard.tscn").instance())
|
||||
newchild.append(load("res://Objects/Traps/Spike/SpikeCard.tscn").instance())
|
||||
cards.SLIME:
|
||||
newchild=(load("res://Objects/Slime/SlimeCard.tscn").instance())
|
||||
if(newchild!=null):
|
||||
HBox.add_child(newchild)
|
||||
newchild.append(load("res://Objects/Slime/SlimeCard.tscn").instance())
|
||||
for i in range(index):
|
||||
$CardsDisplay.add_child(newchild[i])
|
||||
|
||||
for i in range(index):
|
||||
newchild[i].set_begin(cardPositions[i])
|
||||
|
||||
|
||||
for i in range(index):
|
||||
newchild[i].margin_bottom = newchild[i].margin_top+32
|
||||
newchild[i].margin_right = newchild[i].margin_left+32
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Menus/DragNDrop/DragSink.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Objects/Traps/Flame/FlameCard.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Menus/DragNDrop/DragNDropUI.gd" type="Script" id=8]
|
||||
|
||||
[node name="DragNDropUI" type="Control"]
|
||||
@@ -21,18 +20,4 @@ margin_left = 2.0
|
||||
margin_right = 0.0400085
|
||||
margin_bottom = -30.9
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
margin_left = 17.5188
|
||||
margin_top = 220.946
|
||||
margin_right = 57.5188
|
||||
margin_bottom = 260.946
|
||||
custom_constants/separation = 60
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="FlameCard" parent="HBoxContainer" instance=ExtResource( 3 )]
|
||||
margin_left = 0.0
|
||||
margin_top = 0.0
|
||||
margin_right = 0.0
|
||||
margin_bottom = 40.0
|
||||
[node name="CardsDisplay" type="Node" parent="."]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
extends TextureRect
|
||||
# CardDeck
|
||||
var canNotPlace = false
|
||||
export var Item:PackedScene
|
||||
export var PreviewIcon:Texture
|
||||
export var DeleteOnGrab:bool = false
|
||||
@@ -8,6 +9,8 @@ var card_level = 0
|
||||
|
||||
#if a drag is initiated here
|
||||
func get_drag_data(_pos):
|
||||
if (canNotPlace):
|
||||
return null
|
||||
var ctrl = Control.new()
|
||||
var TR = TextureRect.new()
|
||||
TR.texture = get_resized_texture(PreviewIcon, self.rect_size[0], self.rect_size[1])
|
||||
|
||||
@@ -2,7 +2,11 @@ extends Control
|
||||
|
||||
const DrNDrPre = preload("res://Menus/DragNDrop/DragNDropUI.gd")
|
||||
var DrNDr
|
||||
|
||||
var cardPositions = [Vector2(100,150),Vector2(200,150),Vector2(300,150)]
|
||||
var randcards = [0,0,0]
|
||||
var showCards = true
|
||||
var shownCards = []
|
||||
var allowChoosCards = false
|
||||
|
||||
func _ready():
|
||||
DrNDr = get_tree().current_scene.get_node("CanvasLayer").get_node("DragNDropUI")
|
||||
@@ -10,56 +14,87 @@ func _ready():
|
||||
|
||||
|
||||
func starting():
|
||||
var randcards = [0,0,0]
|
||||
|
||||
randcards[0] = randi() % DrNDrPre.cards.EMPTY
|
||||
while(DrNDr.usedCards[0]!=randcards[0] &&\
|
||||
DrNDr.usedCards[1]!=randcards[0] &&\
|
||||
DrNDr.usedCards[2]!=randcards[0] &&\
|
||||
DrNDr.usedCards[3]!=randcards[0] &&\
|
||||
DrNDr.usedCards[4]!=randcards[0]):
|
||||
shownCards = []
|
||||
if (showCards):
|
||||
$Button.hide()
|
||||
randcards[0] = randi() % DrNDrPre.cards.EMPTY
|
||||
while(randcards[0] == randcards[1] &&\
|
||||
DrNDr.usedCards[0]!=randcards[1] &&\
|
||||
DrNDr.usedCards[1]!=randcards[1] &&\
|
||||
DrNDr.usedCards[2]!=randcards[1] &&\
|
||||
DrNDr.usedCards[3]!=randcards[1] &&\
|
||||
DrNDr.usedCards[4]!=randcards[1]):
|
||||
while(DrNDr.usedCards[0]==randcards[0] or
|
||||
DrNDr.usedCards[1]==randcards[0] or
|
||||
DrNDr.usedCards[2]==randcards[0] or
|
||||
DrNDr.usedCards[3]==randcards[0] or
|
||||
DrNDr.usedCards[4]==randcards[0]):
|
||||
randcards[0] = randi() % DrNDrPre.cards.EMPTY
|
||||
randcards[1] = randi() % DrNDrPre.cards.EMPTY
|
||||
while(randcards[0] == randcards[1] or
|
||||
DrNDr.usedCards[0]==randcards[1] or
|
||||
DrNDr.usedCards[1]==randcards[1] or
|
||||
DrNDr.usedCards[2]==randcards[1] or
|
||||
DrNDr.usedCards[3]==randcards[1] or
|
||||
DrNDr.usedCards[4]==randcards[1]):
|
||||
randcards[1] = randi() % DrNDrPre.cards.EMPTY
|
||||
randcards[2] = randi() % DrNDrPre.cards.EMPTY
|
||||
while(randcards[0] == randcards[2] && randcards[1] == randcards[2] &&\
|
||||
DrNDr.usedCards[0]!=randcards[2] &&\
|
||||
DrNDr.usedCards[1]!=randcards[2] &&\
|
||||
DrNDr.usedCards[2]!=randcards[2] &&\
|
||||
DrNDr.usedCards[3]!=randcards[2] &&\
|
||||
DrNDr.usedCards[4]!=randcards[2]):
|
||||
randcards[2] = randi() % DrNDrPre.cards.EMPTY
|
||||
var shownCards = []
|
||||
for i in range(3):
|
||||
match randcards[i]:
|
||||
DrNDrPre.cards.BANANA:
|
||||
shownCards.append(load("res://Objects/Banana/BananaCard.tscn").instance())
|
||||
DrNDrPre.cards.BARRIERE:
|
||||
shownCards.append(load("res://Objects/Barriere/BarrierCard.tscn").instance())
|
||||
DrNDrPre.cards.BARREL:
|
||||
shownCards.append(load("res://Objects/Barrel/BarrelCard.tscn").instance())
|
||||
DrNDrPre.cards.TORCH:
|
||||
shownCards.append(load("res://Objects/Torch/TorchCard.tscn").instance())
|
||||
DrNDrPre.cards.BEAR:
|
||||
shownCards.append(load("res://Objects/Traps/Bear/BearCard.tscn").instance())
|
||||
DrNDrPre.cards.FLAME:
|
||||
shownCards.append(load("res://Objects/Traps/Flame/FlameCard.tscn").instance())
|
||||
#DrNDrPre.cards.SPIKE:
|
||||
#shownCards.append(load("res://Objects/Traps/Spike/SpikeCard.tscn").instance())
|
||||
DrNDrPre.cards.SLIME:
|
||||
shownCards.append(load("res://Objects/Slime/SlimeCard.tscn").instance())
|
||||
for i in range(3):
|
||||
$Cards.add_child(shownCards[i])
|
||||
shownCards[0].set_begin ( Vector2(100,150))
|
||||
shownCards[1].set_begin ( Vector2(200,150))
|
||||
shownCards[2].set_begin ( Vector2(300,150))
|
||||
|
||||
while(randcards[0] == randcards[2] or randcards[1] == randcards[2] or
|
||||
DrNDr.usedCards[0]==randcards[2] or
|
||||
DrNDr.usedCards[1]==randcards[2] or
|
||||
DrNDr.usedCards[2]==randcards[2] or
|
||||
DrNDr.usedCards[3]==randcards[2] or
|
||||
DrNDr.usedCards[4]==randcards[2]):
|
||||
randcards[2] = randi() % DrNDrPre.cards.EMPTY
|
||||
|
||||
for i in range(3):
|
||||
match randcards[i]:
|
||||
DrNDrPre.cards.BANANA:
|
||||
shownCards.append(load("res://Objects/Banana/BananaCard.tscn").instance())
|
||||
DrNDrPre.cards.BARRIERE:
|
||||
shownCards.append(load("res://Objects/Barriere/BarrierCard.tscn").instance())
|
||||
DrNDrPre.cards.BARREL:
|
||||
shownCards.append(load("res://Objects/Barrel/BarrelCard.tscn").instance())
|
||||
DrNDrPre.cards.TORCH:
|
||||
shownCards.append(load("res://Objects/Torch/TorchCard.tscn").instance())
|
||||
DrNDrPre.cards.BEAR:
|
||||
shownCards.append(load("res://Objects/Traps/Bear/BearCard.tscn").instance())
|
||||
DrNDrPre.cards.FLAME:
|
||||
shownCards.append(load("res://Objects/Traps/Flame/FlameCard.tscn").instance())
|
||||
DrNDrPre.cards.SPIKE:
|
||||
shownCards.append(load("res://Objects/Traps/Spike/SpikeCard.tscn").instance())
|
||||
DrNDrPre.cards.SLIME:
|
||||
shownCards.append(load("res://Objects/Slime/SlimeCard.tscn").instance())
|
||||
for i in range(3):
|
||||
$Cards.add_child(shownCards[i])
|
||||
shownCards[0].set_begin (cardPositions[0])
|
||||
shownCards[1].set_begin (cardPositions[1])
|
||||
shownCards[2].set_begin (cardPositions[2])
|
||||
|
||||
for i in range(3):
|
||||
shownCards[i].canNotPlace = true
|
||||
shownCards[i].margin_bottom = shownCards[i].margin_top+32
|
||||
shownCards[i].margin_right = shownCards[i].margin_left+32
|
||||
var i = 0
|
||||
allowChoosCards = true
|
||||
else:
|
||||
pass
|
||||
|
||||
func _input(event):
|
||||
if((event is InputEventMouseButton) && allowChoosCards):
|
||||
for card in range(3):
|
||||
if(event.position[0] >= cardPositions[card][0] &&
|
||||
event.position[0] <= cardPositions[card][0]+32 &&
|
||||
event.position[1] >= cardPositions[card][1] &&
|
||||
event.position[1] <= cardPositions[card][1]+32):
|
||||
for i in range(5):
|
||||
if (DrNDr.usedCards[i] == DrNDrPre.cards.EMPTY):
|
||||
DrNDr.usedCards[i] = randcards[card]
|
||||
Engine.time_scale=1
|
||||
allowChoosCards = false
|
||||
self.hide()
|
||||
if (i == 4):
|
||||
showCards = false
|
||||
for j in range(3):
|
||||
shownCards[j].queue_free()
|
||||
DrNDr.update_cards()
|
||||
return
|
||||
|
||||
|
||||
func _on_Button_pressed():
|
||||
Engine.time_scale=1
|
||||
self.hide()
|
||||
|
||||
@@ -16,15 +16,15 @@ animations = [ {
|
||||
"name": "lvl0",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl1",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl2",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl1",
|
||||
"speed": 60.0
|
||||
} ]
|
||||
|
||||
[node name="BananaCard" type="TextureRect"]
|
||||
|
||||
@@ -16,15 +16,15 @@ animations = [ {
|
||||
"name": "lvl0",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl1",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl2",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl1",
|
||||
"speed": 60.0
|
||||
} ]
|
||||
|
||||
[node name="GenericCard3" type="TextureRect"]
|
||||
|
||||
52
src/Objects/Slime/SlimeCard.tscn
Normal file
52
src/Objects/Slime/SlimeCard.tscn
Normal file
@@ -0,0 +1,52 @@
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://Menus/DragNDrop/DragSource.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Objects/Card/level2.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Objects/Card/level1.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Objects/Card/level0.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Objects/Card/card.png" type="Texture" id=5]
|
||||
[ext_resource path="res://Objects/Slime/Slime.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://testSprites/slime.png" type="Texture" id=7]
|
||||
[ext_resource path="res://Objects/Slime/slime_icon.png" type="Texture" id=8]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl0",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl2",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl1",
|
||||
"speed": 60.0
|
||||
} ]
|
||||
|
||||
[node name="SlimeCard" type="TextureRect"]
|
||||
margin_left = 124.0
|
||||
margin_top = 220.0
|
||||
margin_right = 156.0
|
||||
margin_bottom = 252.0
|
||||
texture = ExtResource( 8 )
|
||||
expand = true
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
Item = ExtResource( 6 )
|
||||
PreviewIcon = ExtResource( 7 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 15.729, 15.793 )
|
||||
z_index = -1
|
||||
texture = ExtResource( 5 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( 33.1035, 40.3068 )
|
||||
frames = SubResource( 1 )
|
||||
animation = "lvl0"
|
||||
BIN
src/Objects/Slime/slime_icon.png
Normal file
BIN
src/Objects/Slime/slime_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 419 B |
34
src/Objects/Slime/slime_icon.png.import
Normal file
34
src/Objects/Slime/slime_icon.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/slime_icon.png-dc1d3257111103e477a0d76ad442deeb.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Objects/Slime/slime_icon.png"
|
||||
dest_files=[ "res://.import/slime_icon.png-dc1d3257111103e477a0d76ad442deeb.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
|
||||
@@ -15,15 +15,15 @@ animations = [ {
|
||||
"name": "lvl0",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 6 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl1",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 5 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl2",
|
||||
"speed": 60.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 6 ) ],
|
||||
"loop": false,
|
||||
"name": "lvl1",
|
||||
"speed": 60.0
|
||||
} ]
|
||||
|
||||
[node name="TorchCard" type="TextureRect"]
|
||||
|
||||
29
src/World.gd
29
src/World.gd
@@ -1,14 +1,14 @@
|
||||
extends Node2D
|
||||
|
||||
export(int) var WinRounds= 10
|
||||
export(int) var WinRounds = 10
|
||||
export(PackedScene) var HeroTemplate
|
||||
export(Vector2) var InitialSpawnPoint=Vector2(344,125)
|
||||
export(Rect2) var SpawnBoxRange=Rect2(20,20,450,180)
|
||||
export(float) var MinDistanceToBoss=100.0
|
||||
export(Vector2) var InitialSpawnPoint = Vector2(344, 125)
|
||||
export(Rect2) var SpawnBoxRange = Rect2(20, 20, 450, 180)
|
||||
export(float) var MinDistanceToBoss = 100.0
|
||||
|
||||
var round_counter = 0
|
||||
var passed_final_Round = false
|
||||
|
||||
var round_counter=0
|
||||
var passed_final_Round=false
|
||||
|
||||
func _ready():
|
||||
randomize()
|
||||
@@ -19,33 +19,34 @@ func _ready():
|
||||
|
||||
func determine_spawnpoint():
|
||||
var point = Vector2(rand_range(SpawnBoxRange.position.x,SpawnBoxRange.position.x+SpawnBoxRange.size.x),rand_range(SpawnBoxRange.position.y,SpawnBoxRange.position.y+SpawnBoxRange.size.y))
|
||||
while(point.distance_to($YSort/SlimeBoss.position)<MinDistanceToBoss):
|
||||
while(point.distance_to($YSort/SlimeBoss.position) < MinDistanceToBoss):
|
||||
point = Vector2(rand_range(SpawnBoxRange.position.x,SpawnBoxRange.position.x+SpawnBoxRange.size.x),rand_range(SpawnBoxRange.position.y,SpawnBoxRange.position.y+SpawnBoxRange.size.y))
|
||||
return point
|
||||
|
||||
|
||||
func hero_has_died():
|
||||
round_counter+=1
|
||||
if (round_counter>=WinRounds and passed_final_Round ==false):
|
||||
passed_final_Round=true
|
||||
round_counter += 1
|
||||
if (round_counter >= WinRounds and not passed_final_Round):
|
||||
passed_final_Round = true
|
||||
$CanvasLayer/Win.show()
|
||||
|
||||
Engine.time_scale=0
|
||||
Engine.time_scale = 0
|
||||
var point = determine_spawnpoint()
|
||||
spawn_new_hero(point.x,point.y)
|
||||
spawn_new_hero(point.x, point.y)
|
||||
$CanvasLayer/SelectUpgradeUI.show()
|
||||
$CanvasLayer/SelectUpgradeUI/Button.show()
|
||||
$CanvasLayer/SelectUpgradeUI.starting()
|
||||
|
||||
|
||||
func spawn_new_hero(x:float,y:float):
|
||||
var hero = HeroTemplate.instance()
|
||||
hero.position=Vector2(x,y)
|
||||
hero.position = Vector2(x, y)
|
||||
hero.name = "Player"
|
||||
$YSort.add_child(hero)
|
||||
|
||||
|
||||
func _on_Win_pressed():
|
||||
if passed_final_Round:
|
||||
#TODO CHANGE SCENE TO WINSCREEN
|
||||
# TODO CHANGE SCENE TO WINSCREEN
|
||||
pass
|
||||
pass # Replace with function body.
|
||||
|
||||
@@ -245,7 +245,6 @@ HeroTemplate = ExtResource( 1 )
|
||||
[node name="Background" parent="." instance=ExtResource( 7 )]
|
||||
pause_mode = 1
|
||||
frame = 20
|
||||
playing = false
|
||||
|
||||
[node name="FloorTileMap" type="TileMap" parent="."]
|
||||
pause_mode = 1
|
||||
|
||||
Reference in New Issue
Block a user