Add initial code
43
README.md
|
|
@ -1 +1,42 @@
|
|||
# wizard-chase
|
||||
Collect all the treasure in the dungeon! Can you make it to the second level? Good luck!
|
||||
|
||||
[Wizard Chase on itch.io]( https://clarkjohn.itch.io/wizard/)
|
||||
|
||||

|
||||
|
||||
# Credits:
|
||||
* Art assets from [0x72.itch.io/dungeontileset-ii]( https://0x72.itch.io/dungeontileset-ii)
|
||||
* Music from [xdeviruchi.itch.io/8-bit-fantasy-adventure-music-pack]( https://xdeviruchi.itch.io/8-bit-fantasy-adventure-music-pack)
|
||||
* Sound assets from:
|
||||
* [kronbits.itch.io/freesfx]( https://kronbits.itch.io/freesfx)
|
||||
* [harvey656.itch.io/8-bit-game-sound-effects-collection]( https://harvey656.itch.io/8-bit-game-sound-effects-collection) using [LabChirp]( https://labbed.itch.io/labchirp)
|
||||
|
||||
Inspired by Pacman and Lock 'n' Chase
|
||||
|
||||
# Game
|
||||
|
||||
### Instructions:
|
||||
|
||||
Enter the dungeon and collect all the coins to descend to the next level.
|
||||
|
||||
### Controls:
|
||||
|
||||
* *Direction or WASD keys* for movement.
|
||||
* *SpaceBar* to cast a Magic Wall
|
||||
, which blocks enemies. Magic Walls can only be added to tiles with horizontal and vertical lines ( and ).
|
||||
|
||||
### Enemies:
|
||||
|
||||
* Fiend - Chases the wizard and can get aggressive.
|
||||
* Ogre - Large and slow.
|
||||
* Slime - Always tailing the wizard.
|
||||
* Lizard Man - Will try to ambush the wizard.
|
||||
|
||||
# Build locally
|
||||
|
||||
HTML, Windows and MacOS are compiled with Godot 3.3.1
|
||||
|
||||
### Fix 'Load failed due to missing dependencies' - res://assets/music/xDeviruchi - And The Journey Begins .wav
|
||||
Music files are not included in this repo. These files can be downloaded from [xdeviruchi/8-bit-fantasy-adventure-music-pack]( https://xdeviruchi.itch.io/8-bit-fantasy-adventure-music-pack)k and copied to folder /assets/music. Files include:
|
||||
* /assets/music/xDeviruchi - And The Journey Begins .wav
|
||||
* /assets/music/xDeviruchi - The Final of The Fantasy.wav
|
||||
|
|
|
|||
0
_export/.gitignore
vendored
Normal file
BIN
assets/audio/FreeSFX/GameSFX/Events/Retro Event 49.wav
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/Retro Event 49.wav-72466ef4bafe686bb4f2d1ed53d7e215.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/FreeSFX/GameSFX/Events/Retro Event 49.wav"
|
||||
dest_files=[ "res://.import/Retro Event 49.wav-72466ef4bafe686bb4f2d1ed53d7e215.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
BIN
assets/audio/FreeSFX/GameSFX/FootStep/Retro FootStep 03.wav
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/Retro FootStep 03.wav-dc5f74535ccd58708be16d2076fd66f1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/FreeSFX/GameSFX/FootStep/Retro FootStep 03.wav"
|
||||
dest_files=[ "res://.import/Retro FootStep 03.wav-dc5f74535ccd58708be16d2076fd66f1.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/Retro FootStep Krushed Landing 01.wav-653a409aa07c78b6b20039f898d1d113.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/FreeSFX/GameSFX/FootStep/Retro FootStep Krushed Landing 01.wav"
|
||||
dest_files=[ "res://.import/Retro FootStep Krushed Landing 01.wav-653a409aa07c78b6b20039f898d1d113.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
BIN
assets/audio/FreeSFX/GameSFX/Magic/Retro Magic 11.wav
Normal file
21
assets/audio/FreeSFX/GameSFX/Magic/Retro Magic 11.wav.import
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/Retro Magic 11.wav-86a3b66b4de51075df6d12cdecb7d5ff.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/FreeSFX/GameSFX/Magic/Retro Magic 11.wav"
|
||||
dest_files=[ "res://.import/Retro Magic 11.wav-86a3b66b4de51075df6d12cdecb7d5ff.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
BIN
assets/audio/FreeSFX/GameSFX/PickUp/Retro PickUp Coin 04.wav
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/Retro PickUp Coin 04.wav-28808b378c6c4f52d198b55865a76fc4.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/FreeSFX/GameSFX/PickUp/Retro PickUp Coin 04.wav"
|
||||
dest_files=[ "res://.import/Retro PickUp Coin 04.wav-28808b378c6c4f52d198b55865a76fc4.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/Retro PowerUP StereoUP 05.wav-e0a77a3444ca9b9c2a1cdad733a012c7.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/FreeSFX/GameSFX/PowerUp/Retro PowerUP StereoUP 05.wav"
|
||||
dest_files=[ "res://.import/Retro PowerUP StereoUP 05.wav-e0a77a3444ca9b9c2a1cdad733a012c7.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
BIN
assets/audio/FreeSFX/GameSFX/Roar/Retro Roar 02.wav
Normal file
21
assets/audio/FreeSFX/GameSFX/Roar/Retro Roar 02.wav.import
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/Retro Roar 02.wav-9f367a773c445e76e0d7cfecd86ae1b9.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/FreeSFX/GameSFX/Roar/Retro Roar 02.wav"
|
||||
dest_files=[ "res://.import/Retro Roar 02.wav-9f367a773c445e76e0d7cfecd86ae1b9.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
BIN
assets/audio/sfx/magic/magic_108.wav
Normal file
21
assets/audio/sfx/magic/magic_108.wav.import
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/magic_108.wav-4742463517632da68dae99a6976738c1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/sfx/magic/magic_108.wav"
|
||||
dest_files=[ "res://.import/magic_108.wav-4742463517632da68dae99a6976738c1.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
BIN
assets/audio/sfx/power/PP_UP_01.wav
Normal file
21
assets/audio/sfx/power/PP_UP_01.wav.import
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/PP_UP_01.wav-2ef9d39f3f0c383112b4874b2a8e9a3d.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/audio/sfx/power/PP_UP_01.wav"
|
||||
dest_files=[ "res://.import/PP_UP_01.wav-2ef9d39f3f0c383112b4874b2a8e9a3d.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=false
|
||||
compress/mode=0
|
||||
BIN
assets/dungeon_palette.aseprite
Normal file
11
assets/font/FontTheme.tres
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[gd_resource type="Theme" load_steps=3 format=2]
|
||||
|
||||
[sub_resource type="DynamicFontData" id=1]
|
||||
font_path = "res://assets/font/PressStart2P-Regular.ttf"
|
||||
|
||||
[sub_resource type="DynamicFont" id=2]
|
||||
size = 8
|
||||
font_data = SubResource( 1 )
|
||||
|
||||
[resource]
|
||||
default_font = SubResource( 2 )
|
||||
92
assets/font/OFL.txt
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
Copyright (c) 2012, Cody "CodeMan38" Boisclair (cody@zone38.net), with Reserved Font Name "Press Start 2P"
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
assets/font/PressStart2P-Regular.ttf
Normal file
BIN
assets/icon.png
Normal file
|
After Width: | Height: | Size: 293 B |
34
assets/icon.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-b6a7fb2db36edd3d95dc42f1dc8c1c5d.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icon.png"
|
||||
dest_files=[ "res://.import/icon.png-b6a7fb2db36edd3d95dc42f1dc8c1c5d.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
1
assets/music/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.wav
|
||||
21
assets/music/xDeviruchi - And The Journey Begins .wav.import
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/xDeviruchi - And The Journey Begins .wav-234cd5b560f5483f2c242b0a60b20020.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/music/xDeviruchi - And The Journey Begins .wav"
|
||||
dest_files=[ "res://.import/xDeviruchi - And The Journey Begins .wav-234cd5b560f5483f2c242b0a60b20020.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=true
|
||||
compress/mode=0
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamSample"
|
||||
path="res://.import/xDeviruchi - The Final of The Fantasy.wav-f09e1f9e49a950db9337568cce9864e1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/music/xDeviruchi - The Final of The Fantasy.wav"
|
||||
dest_files=[ "res://.import/xDeviruchi - The Final of The Fantasy.wav-f09e1f9e49a950db9337568cce9864e1.sample" ]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop=true
|
||||
compress/mode=0
|
||||
BIN
assets/palette.aseprite
Normal file
BIN
assets/treasure_chest.aseprite
Normal file
BIN
assets/wall_y_button.aseprite
Normal file
BIN
assets/windows/icon.ico
Normal file
|
After Width: | Height: | Size: 131 KiB |
14
audio/GameStartMusicTween.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class_name GameStartMusicTween
|
||||
extends Tween
|
||||
|
||||
# https://godotengine.org/qa/27939/how-to-fade-in-out-an-audio-stream
|
||||
|
||||
func fade_music_out(stream_player: AudioStreamPlayer):
|
||||
# tween music volume down to 0
|
||||
self.interpolate_property(stream_player, "volume_db", stream_player.volume_db, -80, 4, 1, Tween.EASE_IN, 0)
|
||||
self.start()
|
||||
|
||||
|
||||
func _on_GameStartMusicTween_tween_completed(object, key):
|
||||
# stop the music -- otherwise it continues to run at silent volume
|
||||
object.stop()
|
||||
182
enemy/Enemy.gd
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
class_name Enemy
|
||||
extends Area2D
|
||||
|
||||
onready var global := $"/root/Global" as Global
|
||||
onready var game := $"/root/Game" as Game
|
||||
onready var dungeon = game.find_node_by_name("Dungeon") as Dungeon
|
||||
onready var player = game.find_node_by_name("Player") as Player
|
||||
|
||||
export var is_debug_path_enable := false
|
||||
|
||||
const ENEMY_COLOR: Color = Color("#000000")
|
||||
|
||||
# init at EnemyAi.gd
|
||||
var wander_direction: Vector2
|
||||
|
||||
var old_pos: Vector2
|
||||
var direction: Vector2
|
||||
|
||||
var timer = null
|
||||
var speed = null
|
||||
|
||||
var wrapped_screen: bool
|
||||
var wrapped_tile := Vector2(0, 0)
|
||||
|
||||
var state
|
||||
|
||||
var last_map_pos_array := []
|
||||
const NUM_MAP_POSITIONS_TO_REMEBER = 2
|
||||
|
||||
var path := []
|
||||
var current_map_pos_in_path := 0
|
||||
|
||||
var is_stuck := false as bool
|
||||
|
||||
enum EnemyStateEnum { IDLE, SEEK, WANDER, OPPOSITE, CLYDE, SEEK_AHEAD, SEEK_BEHIND }
|
||||
var enemy_state_factory
|
||||
|
||||
|
||||
func _init():
|
||||
enemy_state_factory = {
|
||||
EnemyStateEnum.IDLE: IdleState,
|
||||
EnemyStateEnum.SEEK: SeekState,
|
||||
EnemyStateEnum.WANDER: WanderState,
|
||||
EnemyStateEnum.CLYDE: ClydeState,
|
||||
EnemyStateEnum.SEEK_AHEAD: SeekAheadState,
|
||||
EnemyStateEnum.SEEK_BEHIND: SeekBehindState
|
||||
}
|
||||
|
||||
|
||||
func get_state(get_state):
|
||||
return enemy_state_factory.get(get_state)
|
||||
|
||||
|
||||
func _ready():
|
||||
position = dungeon.snap_to_center(position)
|
||||
position.x += dungeon.HALF_CELL_SIZE.x
|
||||
position.y += dungeon.HALF_CELL_SIZE.y
|
||||
|
||||
var current_tile := dungeon.world_to_map(position) as Vector2
|
||||
last_map_pos_array.push_front(current_tile)
|
||||
|
||||
|
||||
func _process(delta: float):
|
||||
if global.state != global.states.ENTERED_MAZE:
|
||||
return
|
||||
|
||||
# pause all enemires if player is dead
|
||||
if !global.is_player_alive:
|
||||
return
|
||||
|
||||
# track position for enemy ai
|
||||
var current_tile := dungeon.world_to_map(position) as Vector2
|
||||
var last_map_pos = last_map_pos_array.front()
|
||||
if last_map_pos == null or last_map_pos != current_tile:
|
||||
last_map_pos_array.push_front(current_tile)
|
||||
last_map_pos_array.resize(NUM_MAP_POSITIONS_TO_REMEBER)
|
||||
|
||||
# prevent enemies from getting stuck in a wrap tile
|
||||
if not wrapped_screen:
|
||||
var post_wrap_pos := dungeon.handle_possible_screen_wrap(position, direction, true) as Vector2
|
||||
if post_wrap_pos != position:
|
||||
wrapped_screen = true
|
||||
wrapped_tile = dungeon.world_to_map(post_wrap_pos)
|
||||
position = post_wrap_pos
|
||||
else:
|
||||
wrapped_screen = false
|
||||
|
||||
# directions
|
||||
if old_pos.x > position.x:
|
||||
$AnimatedSprite.flip_h = true
|
||||
direction = Vector2.LEFT
|
||||
elif old_pos.x < position.x:
|
||||
$AnimatedSprite.flip_h = false
|
||||
direction = Vector2.RIGHT
|
||||
elif old_pos.y < position.y:
|
||||
direction = Vector2.UP
|
||||
elif old_pos.y > position.y:
|
||||
direction = Vector2.DOWN
|
||||
else:
|
||||
direction = Vector2.ZERO
|
||||
|
||||
old_pos = position
|
||||
|
||||
# move
|
||||
if global.state == global.states.ENTERED_MAZE:
|
||||
if state == null:
|
||||
change_state(self, EnemyStateEnum.IDLE, 2)
|
||||
elif is_able_to_move():
|
||||
var pos_to_move = path[0] as Vector2
|
||||
direction = (pos_to_move - position).normalized()
|
||||
var distance = position.distance_to(pos_to_move)
|
||||
if distance > 1:
|
||||
var target_pos = position + (speed * delta * direction)
|
||||
if is_stuck:
|
||||
position = target_pos
|
||||
elif dungeon.is_cell_tile_navigable(dungeon.world_to_map(target_pos)):
|
||||
position = target_pos
|
||||
else:
|
||||
# is stuck on blades, wall, spikes?
|
||||
# TODO fix this, getting stuck in the middle of spikes
|
||||
if dungeon.is_cell_tile_navigable(dungeon.world_to_map(position)):
|
||||
is_stuck = true
|
||||
path = dungeon.getAStarPath(position, dungeon.map_to_world(last_map_pos_array.back()))
|
||||
current_map_pos_in_path = 0
|
||||
pos_to_move = path[0] as Vector2
|
||||
direction = (pos_to_move - position).normalized()
|
||||
position = position + (speed * delta * direction)
|
||||
else:
|
||||
is_stuck = false
|
||||
var obstacle_pos := pos_to_move as Vector2
|
||||
dungeon.disable_astar(obstacle_pos)
|
||||
path = state.get_enemy_path(self, last_map_pos_array.back())
|
||||
current_map_pos_in_path = 0
|
||||
dungeon.enable_astar(obstacle_pos)
|
||||
else:
|
||||
path.remove(0)
|
||||
current_map_pos_in_path += 1
|
||||
else:
|
||||
# Enemy AI
|
||||
is_stuck = false
|
||||
path = state.get_enemy_path(self, last_map_pos_array.back())
|
||||
current_map_pos_in_path = 0
|
||||
|
||||
# only for debug drawing of path in _draw
|
||||
update()
|
||||
|
||||
|
||||
func is_able_to_move():
|
||||
return (
|
||||
path.size() > 0
|
||||
and current_map_pos_in_path < state.MAP_POS_TO_RECHECK_PATH
|
||||
and !wrapped_screen
|
||||
and state.is_able_to_move(self, player)
|
||||
)
|
||||
|
||||
|
||||
func change_state(caller, new_state, wait_time: float):
|
||||
# free old change_state timers
|
||||
for child_node in get_children():
|
||||
if child_node.name == "change_states":
|
||||
child_node.queue_free()
|
||||
|
||||
state = get_state(new_state).new(player, dungeon)
|
||||
timer = Timer.new()
|
||||
self.add_child(timer)
|
||||
timer.set_wait_time(wait_time)
|
||||
timer.name = "change_states"
|
||||
timer.connect("timeout", caller, "change_states")
|
||||
timer.set_one_shot(true)
|
||||
timer.start()
|
||||
|
||||
|
||||
func _draw():
|
||||
if is_debug_path_enable:
|
||||
if state != null and path.size() > 1:
|
||||
for p in path:
|
||||
draw_circle(p - get_global_position(), 4, _get_enemy_color())
|
||||
|
||||
|
||||
# to override
|
||||
func _get_enemy_color() -> Color:
|
||||
return Color.white
|
||||
55
enemy/ai/EnemyAI.gd
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
extends Node2D
|
||||
|
||||
onready var global := get_node("/root/Global")
|
||||
onready var game := $"/root/Game" as Game
|
||||
onready var player = game.find_node_by_name("Player") as Player
|
||||
onready var treasure = game.find_node_by_name("Treasure") as Treasure
|
||||
|
||||
onready var total_coins_in_level := treasure.get_used_cells_by_id(treasure.TILE_COIN).size() as int
|
||||
|
||||
const POSSIBLE_WANDER_DIRECTIONS = [Vector2.UP, Vector2.RIGHT, Vector2.DOWN, Vector2.LEFT]
|
||||
|
||||
const PERCENTAGE_OF_COINS_LEFT_TO_INCREASE_FIEND_SPEED := .2
|
||||
|
||||
const MAX_ENEMY_SPEED_FACTOR_TO_PLAYER := 1.05
|
||||
const ENEMY_INITIAL_SPEED_FACTOR_TO_PLAYER := .8
|
||||
|
||||
var enemy_speed_increase_per_level
|
||||
var max_enemy_speed
|
||||
var inital_enemy_speed
|
||||
|
||||
|
||||
func _ready():
|
||||
# distribute wander directions; might be more than 4 enemies later on
|
||||
for i in self.get_child_count():
|
||||
self.get_child(i).wander_direction = POSSIBLE_WANDER_DIRECTIONS[i % POSSIBLE_WANDER_DIRECTIONS.size()]
|
||||
|
||||
inital_enemy_speed = self.get_child(0).speed
|
||||
enemy_speed_increase_per_level = (player.speed - inital_enemy_speed) / 10
|
||||
max_enemy_speed = player.speed * MAX_ENEMY_SPEED_FACTOR_TO_PLAYER as float
|
||||
|
||||
|
||||
func _process(_delta) -> void:
|
||||
if (
|
||||
not $EnemyFiend.is_chase_state_enabled
|
||||
and (treasure.get_total_coins_left() < total_coins_in_level * PERCENTAGE_OF_COINS_LEFT_TO_INCREASE_FIEND_SPEED)
|
||||
):
|
||||
$EnemyFiend.enable_chase_state()
|
||||
|
||||
if not $EnemyLizardMan.is_chase_state_enabled and global.current_chest_score_index > 1:
|
||||
$EnemyLizardMan.enable_chase_state()
|
||||
|
||||
if not $EnemySlime.is_chase_state_enabled and global.current_chest_score_index > 2:
|
||||
$EnemySlime.enable_chase_state()
|
||||
|
||||
if not global.is_enemies_speed_adjustment_per_level:
|
||||
global.is_enemies_speed_adjustment_per_level = true
|
||||
|
||||
for i in self.get_child_count():
|
||||
var current_speed = self.get_child(i).speed
|
||||
var speed_increase = (
|
||||
0
|
||||
if global.current_level == 1
|
||||
else enemy_speed_increase_per_level * (global.current_level - 1)
|
||||
)
|
||||
self.get_child(i).speed = clamp(current_speed + speed_increase, 0, max_enemy_speed)
|
||||
17
enemy/ai/EnemyState.gd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class_name EnemyState
|
||||
extends Area2D
|
||||
|
||||
func _init():
|
||||
pass
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
|
||||
func move(_delta: float, _enemy, _previous_tile: Vector2) -> Vector2:
|
||||
return Vector2(0, 0)
|
||||
|
||||
func is_able_to_move(enemy, player: Player) -> bool:
|
||||
return true
|
||||
|
||||
func get_enemy_path(enemy, previous_tile: Vector2) -> Array:
|
||||
return []
|
||||
41
enemy/ai/states/ClydeState.gd
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Similar to Clyde in pacman
|
||||
class_name ClydeState
|
||||
extends WanderState
|
||||
|
||||
const TILES_AWAY_FROM_PLAYER_TO_BACK_OFF := 5
|
||||
const WANDER_MAP_POS_TO_RECHECK_PATH := 4
|
||||
|
||||
var is_seeking_player: bool = true
|
||||
var distance_to_player_to_change_to_stop: float
|
||||
|
||||
|
||||
# weird child constructor, see https://docs.godotengine.org/en/3.0/getting_started/scripting/gdscript/gdscript_basics.html#class-constructor
|
||||
func _init(player, walls).(player, walls):
|
||||
distance_to_player_to_change_to_stop = _walls.get_cell_size().x * TILES_AWAY_FROM_PLAYER_TO_BACK_OFF
|
||||
|
||||
|
||||
func is_able_to_move(enemy, _player: Player) -> bool:
|
||||
var position := enemy.position as Vector2
|
||||
var current_map_pos_in_path := enemy.current_map_pos_in_path as int
|
||||
|
||||
if is_seeking_player and position.distance_to(_player.position) < distance_to_player_to_change_to_stop:
|
||||
return false
|
||||
elif not is_seeking_player and current_map_pos_in_path > WANDER_MAP_POS_TO_RECHECK_PATH:
|
||||
return false
|
||||
else:
|
||||
return true
|
||||
|
||||
|
||||
func get_enemy_path(enemy, previous_tile: Vector2) -> Array:
|
||||
var position := enemy.position as Vector2
|
||||
|
||||
if not is_seeking_player:
|
||||
is_seeking_player = true
|
||||
_walls.disable_astar(_walls.map_to_world(previous_tile))
|
||||
var path = _walls.getAStarPath(position, _player.position)
|
||||
_walls.enable_astar(_walls.map_to_world(previous_tile))
|
||||
|
||||
return path
|
||||
else:
|
||||
is_seeking_player = false
|
||||
return get_wander_path(enemy, previous_tile)
|
||||
10
enemy/ai/states/IdleState.gd
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class_name IdleState
|
||||
extends EnemyState
|
||||
|
||||
|
||||
func _init(player, walls: Dungeon):
|
||||
pass
|
||||
|
||||
|
||||
func get_enemy_path(enemy, previous_tile: Vector2) -> Array:
|
||||
return []
|
||||
24
enemy/ai/states/SeekAheadState.gd
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
class_name SeekAheadState
|
||||
extends EnemyState
|
||||
|
||||
var _walls: Dungeon
|
||||
var _player: Area2D
|
||||
|
||||
const MAP_POS_TO_RECHECK_PATH := 8
|
||||
const TILES_TO_SEEK_AHEAD_OF_PLAYER = 5
|
||||
|
||||
|
||||
func _init(player, walls: Dungeon):
|
||||
_player = player
|
||||
_walls = walls as Dungeon
|
||||
|
||||
|
||||
func get_enemy_path(enemy, previous_tile: Vector2) -> Array:
|
||||
var position := enemy.position as Vector2
|
||||
|
||||
var path := _walls.getAStarPath(position, get_player_future_position())
|
||||
return path
|
||||
|
||||
|
||||
func get_player_future_position() -> Vector2:
|
||||
return _walls.get_path_ahead(_player.position, _player.direction, TILES_TO_SEEK_AHEAD_OF_PLAYER)
|
||||
39
enemy/ai/states/SeekBehindState.gd
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
class_name SeekBehindState
|
||||
extends EnemyState
|
||||
|
||||
var _walls: Dungeon
|
||||
var _player: Area2D
|
||||
|
||||
const MAP_POS_TO_RECHECK_PATH := 8
|
||||
const TILES_TO_SEEK_AHEAD_OF_PLAYER = 3
|
||||
|
||||
|
||||
func _init(player, walls: Dungeon):
|
||||
_player = player
|
||||
_walls = walls as Dungeon
|
||||
|
||||
|
||||
func get_enemy_path(enemy, _previous_tile: Vector2) -> Array:
|
||||
var position := enemy.position as Vector2
|
||||
|
||||
var path := _walls.getAStarPath(position, get_player_opposite_position())
|
||||
return path
|
||||
|
||||
|
||||
func get_player_opposite_position() -> Vector2:
|
||||
return _walls.get_path_ahead(
|
||||
_player.position, _get_opposite_direction(_player.direction), TILES_TO_SEEK_AHEAD_OF_PLAYER
|
||||
)
|
||||
|
||||
|
||||
func _get_opposite_direction(direction: Vector2) -> Vector2:
|
||||
if direction == Vector2.UP:
|
||||
return Vector2.DOWN
|
||||
elif direction == Vector2.RIGHT:
|
||||
return Vector2.LEFT
|
||||
elif direction == Vector2.DOWN:
|
||||
return Vector2.UP
|
||||
elif direction == Vector2.LEFT:
|
||||
return Vector2.RIGHT
|
||||
else:
|
||||
return direction
|
||||
23
enemy/ai/states/SeekState.gd
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
class_name SeekState
|
||||
extends EnemyState
|
||||
|
||||
var _walls: Dungeon
|
||||
var _player: Area2D
|
||||
|
||||
const MAP_POS_TO_RECHECK_PATH := 8
|
||||
|
||||
|
||||
func _init(player, walls: Dungeon):
|
||||
_player = player as Player
|
||||
_walls = walls as Dungeon
|
||||
|
||||
|
||||
func get_enemy_path(enemy, previous_tile: Vector2) -> Array:
|
||||
var path := []
|
||||
var position := enemy.position as Vector2
|
||||
|
||||
_walls.disable_astar(_walls.map_to_world(previous_tile))
|
||||
path = _walls.getAStarPath(position, _player.position)
|
||||
_walls.enable_astar(_walls.map_to_world(previous_tile))
|
||||
|
||||
return path
|
||||
97
enemy/ai/states/WanderState.gd
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
class_name WanderState
|
||||
extends EnemyState
|
||||
|
||||
var _walls: TileMap
|
||||
var _player: Area2D
|
||||
|
||||
const MAP_POS_TO_RECHECK_PATH := 20
|
||||
const MAP_SIZE := 50
|
||||
|
||||
var tangent_toggle_x_array := [Vector2.LEFT, Vector2.RIGHT]
|
||||
var tangent_toggle_y_array := [Vector2.UP, Vector2.DOWN]
|
||||
|
||||
# half or a quarter, when finding shift post
|
||||
var shift_pos_array := [2, 4]
|
||||
|
||||
|
||||
func _init(player, walls):
|
||||
_player = player
|
||||
_walls = walls
|
||||
|
||||
|
||||
func get_enemy_path(enemy, previous_tile: Vector2) -> Array:
|
||||
return get_wander_path(enemy, previous_tile)
|
||||
|
||||
|
||||
func get_wander_path(enemy, previous_tile: Vector2) -> Array:
|
||||
var path := []
|
||||
var wander_direction = enemy.wander_direction
|
||||
var position := enemy.position as Vector2
|
||||
|
||||
var shift_direction = get_shift_direction(_player.position, position)
|
||||
var target_wander_direction = get_target_wander_direction(shift_direction, wander_direction)
|
||||
|
||||
_walls.disable_astar(_walls.map_to_world(previous_tile))
|
||||
path = _walls.getAStarPath(position, target_wander_direction)
|
||||
_walls.enable_astar(_walls.map_to_world(previous_tile))
|
||||
if path.size() == 0:
|
||||
path = _walls.getAStarPath(position, shift_direction)
|
||||
|
||||
return path
|
||||
|
||||
|
||||
func get_shift_direction(player_pos: Vector2, enemy_pos: Vector2) -> Vector2:
|
||||
var shift_amount = swap_get(shift_pos_array) as int
|
||||
|
||||
var new_x = (int(player_pos.x) + (_walls.max_x_pos / shift_amount)) % _walls.max_x_pos
|
||||
var new_y = (int(player_pos.y) + (_walls.max_y_pos / shift_amount)) % _walls.max_y_pos
|
||||
|
||||
return Vector2(new_x, new_y)
|
||||
|
||||
|
||||
func is_player_around_corner_of_map(player_pos: Vector2) -> bool:
|
||||
return false
|
||||
|
||||
|
||||
func get_target_wander_direction(pos: Vector2, wander_direction: Vector2) -> Vector2:
|
||||
var far_pos := get_far_pos(pos, wander_direction)
|
||||
var far_with_tangent_pos := get_tangent_pos(far_pos, wander_direction)
|
||||
|
||||
return far_with_tangent_pos
|
||||
|
||||
|
||||
func get_far_pos(pos: Vector2, wander_direction: Vector2) -> Vector2:
|
||||
if wander_direction == Vector2.UP:
|
||||
pos.y -= MAP_SIZE * _walls.get_cell_size().y
|
||||
elif wander_direction == Vector2.RIGHT:
|
||||
pos.x += MAP_SIZE * _walls.get_cell_size().x
|
||||
elif wander_direction == Vector2.DOWN:
|
||||
pos.y += MAP_SIZE * _walls.get_cell_size().y
|
||||
elif wander_direction == Vector2.LEFT:
|
||||
pos.x -= MAP_SIZE * _walls.get_cell_size().x
|
||||
|
||||
return Vector2(clamp(pos.x, _walls.min_x_pos, _walls.max_x_pos), clamp(pos.y, _walls.min_y_pos, _walls.max_y_pos)) as Vector2
|
||||
|
||||
|
||||
func get_tangent_pos(pos: Vector2, wander_direction: Vector2) -> Vector2:
|
||||
if wander_direction == Vector2.UP or wander_direction == Vector2.DOWN:
|
||||
var new_dir = swap_get(tangent_toggle_y_array) as Vector2
|
||||
if new_dir == Vector2.LEFT:
|
||||
pos.x -= _walls.get_cell_size().x * 2
|
||||
else:
|
||||
pos.x += _walls.get_cell_size().x * 2
|
||||
else:
|
||||
var new_dir = swap_get(tangent_toggle_x_array) as Vector2
|
||||
if new_dir == Vector2.UP:
|
||||
pos.y -= _walls.get_cell_size().y * 2
|
||||
else:
|
||||
pos.y += _walls.get_cell_size().y * 2
|
||||
|
||||
return Vector2(clamp(pos.x, _walls.min_x_pos, _walls.max_x_pos), clamp(pos.y, _walls.min_y_pos, _walls.max_y_pos)) as Vector2
|
||||
|
||||
|
||||
func swap_get(swap_array: Array):
|
||||
var temp = swap_array[0]
|
||||
swap_array[0] = swap_array[1]
|
||||
swap_array[1] = temp
|
||||
return swap_array[0]
|
||||
38
enemy/enemyfiend/EnemyFiend.gd
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
extends Enemy
|
||||
|
||||
const FIEND_COLOR: Color = Color("#da4e38")
|
||||
|
||||
export var is_enabled := true
|
||||
|
||||
var primary_AI_only := false
|
||||
var is_chase_state_enabled := false
|
||||
|
||||
|
||||
func _ready():
|
||||
set_process(is_enabled)
|
||||
disable_chase_state()
|
||||
|
||||
|
||||
func enable_chase_state() -> void:
|
||||
is_chase_state_enabled = true
|
||||
speed = player.speed * $"../".MAX_ENEMY_SPEED_FACTOR_TO_PLAYER
|
||||
primary_AI_only = true
|
||||
|
||||
|
||||
func disable_chase_state() -> void:
|
||||
is_chase_state_enabled = false
|
||||
speed = player.speed * 0.8
|
||||
primary_AI_only = false
|
||||
|
||||
|
||||
func change_states():
|
||||
if primary_AI_only:
|
||||
change_state(self, EnemyStateEnum.SEEK, 100)
|
||||
elif state is IdleState or state is SeekState:
|
||||
change_state(self, EnemyStateEnum.WANDER, 5)
|
||||
else:
|
||||
change_state(self, EnemyStateEnum.SEEK, 5)
|
||||
|
||||
|
||||
func _get_enemy_color() -> Color:
|
||||
return FIEND_COLOR
|
||||
BIN
enemy/enemyfiend/EnemyFiend.png
Normal file
|
After Width: | Height: | Size: 902 B |
34
enemy/enemyfiend/EnemyFiend.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/EnemyFiend.png-76817b915c6191e9e22bb98b20d04552.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://enemy/enemyfiend/EnemyFiend.png"
|
||||
dest_files=[ "res://.import/EnemyFiend.png-76817b915c6191e9e22bb98b20d04552.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
69
enemy/enemyfiend/EnemyFiend.tscn
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
[gd_scene load_steps=12 format=2]
|
||||
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 25 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 25 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 16, 25 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 48, 0, 16, 25 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 16, 25 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 80, 0, 16, 25 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=7]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 96, 0, 16, 25 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 112, 0, 16, 25 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=9]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=10]
|
||||
extents = Vector2( 4, 6 )
|
||||
|
||||
[node name="EnemyFiend" type="Area2D"]
|
||||
z_index = 3
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( 0, -13.7502 )
|
||||
frames = SubResource( 9 )
|
||||
frame = 2
|
||||
speed_scale = 2.0
|
||||
playing = true
|
||||
offset = Vector2( 0, 5 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, -3 )
|
||||
shape = SubResource( 10 )
|
||||
37
enemy/enemylizardman/EnemyLizardMan.gd
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
extends Enemy
|
||||
|
||||
const LIZARDMAN_COLOR: Color = Color("#49a790")
|
||||
|
||||
export var is_enabled := true
|
||||
|
||||
var primary_AI_only := false
|
||||
var is_chase_state_enabled := false
|
||||
|
||||
|
||||
func _ready():
|
||||
set_process(is_enabled)
|
||||
speed = player.speed * 0.8
|
||||
disable_chase_state()
|
||||
|
||||
|
||||
func enable_chase_state() -> void:
|
||||
is_chase_state_enabled = true
|
||||
primary_AI_only = true
|
||||
|
||||
|
||||
func disable_chase_state() -> void:
|
||||
is_chase_state_enabled = false
|
||||
primary_AI_only = false
|
||||
|
||||
|
||||
func change_states():
|
||||
if primary_AI_only:
|
||||
change_state(self, EnemyStateEnum.SEEK_AHEAD, 100)
|
||||
elif state is IdleState or state is SeekAheadState:
|
||||
change_state(self, EnemyStateEnum.WANDER, 5)
|
||||
else:
|
||||
change_state(self, EnemyStateEnum.SEEK_AHEAD, 5)
|
||||
|
||||
|
||||
func _get_enemy_color() -> Color:
|
||||
return LIZARDMAN_COLOR
|
||||
BIN
enemy/enemylizardman/EnemyLizardMan.png
Normal file
|
After Width: | Height: | Size: 960 B |
34
enemy/enemylizardman/EnemyLizardMan.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/EnemyLizardMan.png-beb5cc1a801a9397c54ee650f0ab3074.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://enemy/enemylizardman/EnemyLizardMan.png"
|
||||
dest_files=[ "res://.import/EnemyLizardMan.png-beb5cc1a801a9397c54ee650f0ab3074.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
69
enemy/enemylizardman/EnemyLizardMan.tscn
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
[gd_scene load_steps=12 format=2]
|
||||
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 23 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 23 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 16, 23 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 48, 0, 16, 23 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 16, 23 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 80, 0, 16, 23 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=7]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 96, 0, 16, 23 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 112, 0, 16, 23 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=9]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=10]
|
||||
extents = Vector2( 4.14031, 5.17601 )
|
||||
|
||||
[node name="EnemyLizardMan" type="Area2D"]
|
||||
z_index = 3
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( 0, -8 )
|
||||
rotation = 0.0174533
|
||||
frames = SubResource( 9 )
|
||||
playing = true
|
||||
offset = Vector2( 0, 2 )
|
||||
flip_h = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( -0.140312, -1.82399 )
|
||||
shape = SubResource( 10 )
|
||||
22
enemy/enemyogre/EnemyOgre.gd
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
extends Enemy
|
||||
|
||||
const OGRE_COLOR: Color = Color("#8f4029")
|
||||
|
||||
export var is_enabled := true
|
||||
|
||||
|
||||
func _ready():
|
||||
set_process(is_enabled)
|
||||
# slower than other enemies
|
||||
speed = player.speed * 0.7
|
||||
|
||||
|
||||
func change_states():
|
||||
if state is IdleState or state is ClydeState:
|
||||
change_state(self, EnemyStateEnum.CLYDE, 99)
|
||||
else:
|
||||
change_state(self, EnemyStateEnum.CLYDE, 99)
|
||||
|
||||
|
||||
func _get_enemy_color() -> Color:
|
||||
return OGRE_COLOR
|
||||
BIN
enemy/enemyogre/EnemyOgre.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
34
enemy/enemyogre/EnemyOgre.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/EnemyOgre.png-97455fedab595d09928b00cc6b68071a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://enemy/enemyogre/EnemyOgre.png"
|
||||
dest_files=[ "res://.import/EnemyOgre.png-97455fedab595d09928b00cc6b68071a.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
69
enemy/enemyogre/EnemyOgre.tscn
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
[gd_scene load_steps=12 format=2]
|
||||
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 20, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 20, 0, 20, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 40, 0, 20, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 60, 0, 20, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 80, 0, 20, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 100, 0, 20, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=7]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 120, 0, 20, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 140, 0, 20, 28 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=9]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=10]
|
||||
extents = Vector2( 8, 11 )
|
||||
|
||||
[node name="EnemyOgre" type="Area2D"]
|
||||
z_index = 3
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( 0, -13.75 )
|
||||
frames = SubResource( 9 )
|
||||
frame = 5
|
||||
speed_scale = 0.8
|
||||
playing = true
|
||||
offset = Vector2( 0, 4 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, -8 )
|
||||
shape = SubResource( 10 )
|
||||
36
enemy/enemyslime/EnemySlime.gd
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
extends Enemy
|
||||
|
||||
const SLIME_COLOR: Color = Color("#97da3f")
|
||||
|
||||
export var is_enabled := true
|
||||
var is_chase_state_enabled := false
|
||||
var primary_AI_only = false
|
||||
|
||||
|
||||
func _ready():
|
||||
set_process(is_enabled)
|
||||
speed = player.speed * 0.8
|
||||
disable_chase_state()
|
||||
|
||||
|
||||
func enable_chase_state() -> void:
|
||||
is_chase_state_enabled = true
|
||||
primary_AI_only = true
|
||||
|
||||
|
||||
func disable_chase_state() -> void:
|
||||
is_chase_state_enabled = false
|
||||
primary_AI_only = false
|
||||
|
||||
|
||||
func change_states():
|
||||
if primary_AI_only:
|
||||
change_state(self, EnemyStateEnum.SEEK_BEHIND, 20)
|
||||
elif state is IdleState or state is SeekBehindState:
|
||||
change_state(self, EnemyStateEnum.WANDER, 5)
|
||||
else:
|
||||
change_state(self, EnemyStateEnum.SEEK_BEHIND, 11)
|
||||
|
||||
|
||||
func _get_enemy_color() -> Color:
|
||||
return SLIME_COLOR
|
||||
BIN
enemy/enemyslime/EnemySlime.png
Normal file
|
After Width: | Height: | Size: 369 B |
34
enemy/enemyslime/EnemySlime.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/EnemySlime.png-f6127382170cd34ef61486c111b380c4.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://enemy/enemyslime/EnemySlime.png"
|
||||
dest_files=[ "res://.import/EnemySlime.png-f6127382170cd34ef61486c111b380c4.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
50
enemy/enemyslime/EnemySlime.tscn
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 17, 18 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 17, 0, 17, 18 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 34, 0, 17, 18 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 51, 0, 17, 18 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=5]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ) ],
|
||||
"loop": true,
|
||||
"name": "moving",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=6]
|
||||
extents = Vector2( 3.99999, 5.33415 )
|
||||
|
||||
[node name="EnemySlime" type="Area2D"]
|
||||
z_index = 3
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( 0, -10 )
|
||||
frames = SubResource( 5 )
|
||||
animation = "moving"
|
||||
speed_scale = 0.6
|
||||
playing = true
|
||||
offset = Vector2( 0, 6 )
|
||||
flip_h = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 1.15037e-05, -2.66585 )
|
||||
shape = SubResource( 6 )
|
||||
7
global/Game.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class_name Game
|
||||
extends Node2D
|
||||
|
||||
|
||||
# convience, better way?
|
||||
func find_node_by_name(node_name) -> Node:
|
||||
return get_tree().get_root().find_node(node_name, true, false)
|
||||
737
global/Game.tscn
Normal file
216
global/Global.gd
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
#warning-ignore-all:unused_variable
|
||||
extends Node2D
|
||||
|
||||
var default_player_lives := 3
|
||||
var current_player_lives := default_player_lives
|
||||
|
||||
var current_level := 1 # continues
|
||||
# actual levels that exist in the /levels folder
|
||||
const MAX_LEVEL_MAPS := 5
|
||||
|
||||
var empty_coin_map_pos := [] as Array
|
||||
|
||||
var current_score := 00
|
||||
# saw this on arcade donky kong sceenshot
|
||||
var high_score := 7640
|
||||
|
||||
#var has_game_started := false
|
||||
|
||||
const chest_score_value := [500, 750, 1000, 1250]
|
||||
var current_chest_score_index := 0
|
||||
|
||||
# https://strategywiki.org/wiki/Lock%27n%27Chase/Walkthrough
|
||||
const misc_treasure_score_value := [200, 300, 500]
|
||||
const misc_treasure_animation_color := [
|
||||
"4ba747", "ac3232", "ee8e2e", "b6cbcf", "9b1a0a", "4ba747", "da4e38", "da4e38", "5698cc", "97da3f", "da4e38"
|
||||
]
|
||||
|
||||
var misc_treasure_get := []
|
||||
|
||||
# local
|
||||
var timer
|
||||
var is_player_alive
|
||||
|
||||
var is_enemies_speed_adjustment_per_level := false
|
||||
|
||||
signal state_changed
|
||||
enum states {
|
||||
PLAYER_WAITING_TO_ENTER,
|
||||
ENTERED_MAZE,
|
||||
DIED_RESTARTING,
|
||||
LOADING_NEXT_LEVEL,
|
||||
GAME_OVER_RESTARTING,
|
||||
GAME_OVER_PLAYER_CAN_RESTART
|
||||
}
|
||||
var state: int = states.PLAYER_WAITING_TO_ENTER setget set_state
|
||||
|
||||
|
||||
func set_state(new_state: int) -> void:
|
||||
var old_state: int = state
|
||||
if new_state == old_state:
|
||||
return
|
||||
if new_state == null:
|
||||
breakpoint
|
||||
state = new_state
|
||||
emit_signal("state_changed", old_state, new_state)
|
||||
|
||||
|
||||
func _ready():
|
||||
set_state(states.PLAYER_WAITING_TO_ENTER)
|
||||
init()
|
||||
connect("state_changed", self, "on_state_changed")
|
||||
connect("state_changed", $"/root/Game".find_node_by_name("Treasure"), "on_state_changed")
|
||||
|
||||
|
||||
func on_state_changed(from: int, to: int) -> void:
|
||||
if from == states.GAME_OVER_PLAYER_CAN_RESTART and to == states.PLAYER_WAITING_TO_ENTER:
|
||||
$"/root/Game/Audio/GameStartMusic".play()
|
||||
|
||||
if to == states.ENTERED_MAZE and $"/root/Game/Audio/GameStartMusic".playing == true:
|
||||
$"/root/Game/Audio/GameStartMusic/GameStartMusicTween".fade_music_out($"/root/Game/Audio/GameStartMusic")
|
||||
|
||||
|
||||
func init() -> void:
|
||||
timer = null
|
||||
is_player_alive = true
|
||||
#is_loading_next_level = false
|
||||
empty_coin_map_pos = []
|
||||
current_chest_score_index = 0
|
||||
current_player_lives = default_player_lives
|
||||
|
||||
#self.set_state(states.ENTERED_MAZE)
|
||||
#has_game_started = false
|
||||
current_score = 00
|
||||
if $"/root/Game/Interface/UI/ScoreLabel" != null:
|
||||
$"/root/Game/Interface/UI/ScoreLabel".update_score(0)
|
||||
|
||||
misc_treasure_get = []
|
||||
for i in $"/root/Game/World/Level/Treasure".MAX_LEVEL_MISC_TREASURE:
|
||||
misc_treasure_get.append(false)
|
||||
|
||||
$"/root/Game/Interface/UI/HBoxContainer/UILives".reset_ui_lives()
|
||||
$"/root/Game/Interface/UI/HBoxContainer/UIInventory".hide_all()
|
||||
|
||||
is_enemies_speed_adjustment_per_level = false
|
||||
var game_music_start := $"/root/Game/Audio/GameStartMusic" as AudioStreamPlayer
|
||||
game_music_start.volume_db = -20
|
||||
game_music_start.play()
|
||||
|
||||
|
||||
func player_dies() -> void:
|
||||
set_state(states.DIED_RESTARTING)
|
||||
is_player_alive = false
|
||||
current_player_lives -= 1
|
||||
$"/root/Game/Audio/PlayerDieSound".play()
|
||||
|
||||
if current_player_lives == 0:
|
||||
timer = Timer.new()
|
||||
timer.name = "start_game_over"
|
||||
self.add_child(timer)
|
||||
timer.set_wait_time(.5)
|
||||
timer.connect("timeout", self, "start_game_over")
|
||||
timer.set_one_shot(true)
|
||||
timer.start()
|
||||
else:
|
||||
$"/root/Game/Interface/UI/HBoxContainer/UILives".reset_ui_lives()
|
||||
|
||||
timer = Timer.new()
|
||||
timer.name = "reset_level"
|
||||
self.add_child(timer)
|
||||
timer.set_wait_time(1)
|
||||
timer.connect("timeout", self, "reset_level")
|
||||
timer.set_one_shot(true)
|
||||
timer.start()
|
||||
|
||||
|
||||
func reset_level() -> void:
|
||||
var map_level := _get_map_level()
|
||||
var level_scene_path = get_level_scene_path(map_level)
|
||||
$"/root/Game/Interface/SceneTransitionRect".transition_to(level_scene_path)
|
||||
set_state(states.PLAYER_WAITING_TO_ENTER)
|
||||
|
||||
|
||||
func start_game_over() -> void:
|
||||
current_level = 1
|
||||
var map_level := _get_map_level()
|
||||
var level_scene_path = get_level_scene_path(map_level)
|
||||
|
||||
$"/root/Game/World/GameOverCanvasModulate".start_game_over()
|
||||
|
||||
#init()
|
||||
#set_state(states.PLAYER_WAITING_TO_ENTER)
|
||||
|
||||
|
||||
func get_misc_treasure() -> void:
|
||||
var misc_treasue_index := get_misc_treasure_index_for_level()
|
||||
|
||||
misc_treasure_get[misc_treasue_index] = true
|
||||
var ui_node = $"/root/Game/Interface/UI/HBoxContainer/UIInventory".get_child(misc_treasue_index) as TextureRect
|
||||
if ui_node:
|
||||
ui_node.visible = true
|
||||
|
||||
|
||||
func debug_get_misc_treasure(treasure_index : int) -> void:
|
||||
var misc_treasue_index := treasure_index
|
||||
|
||||
misc_treasure_get[misc_treasue_index] = true
|
||||
var ui_node = $"/root/Game/Interface/UI/HBoxContainer/UIInventory".get_child(misc_treasue_index) as TextureRect
|
||||
if ui_node:
|
||||
ui_node.visible = true
|
||||
|
||||
func has_player_got_misc_treasure() -> bool:
|
||||
return misc_treasure_get[get_misc_treasure_index_for_level()]
|
||||
|
||||
|
||||
func get_misc_treasure_index_for_level() -> int:
|
||||
var treasure = $"/root/Game".find_node_by_name("Treasure")
|
||||
if current_level < treasure.MAX_LEVEL_MISC_TREASURE:
|
||||
return current_level - 1
|
||||
else:
|
||||
return treasure.MAX_LEVEL_MISC_TREASURE - 1
|
||||
|
||||
|
||||
func load_next_level(check_for_total_coins: bool) -> void:
|
||||
set_state(states.LOADING_NEXT_LEVEL)
|
||||
#if not is_loading_next_level:
|
||||
|
||||
var treasure = $"/root/Game".find_node_by_name("Treasure")
|
||||
|
||||
# TODO Remove is debug on?
|
||||
if check_for_total_coins:
|
||||
# load each time
|
||||
if treasure.get_total_coins_left() != 0:
|
||||
return
|
||||
|
||||
#is_loading_next_level = true
|
||||
current_level += 1
|
||||
|
||||
# reset last treasure slot to be false
|
||||
misc_treasure_get[treasure.MAX_LEVEL_MISC_TREASURE - 1] = false
|
||||
|
||||
# level only
|
||||
empty_coin_map_pos = []
|
||||
$"/root/Game/World/Level/EnemyAI/EnemyFiend".disable_chase_state()
|
||||
$"/root/Game/World/Level/EnemyAI/EnemyLizardMan".disable_chase_state()
|
||||
$"/root/Game/World/Level/EnemyAI/EnemySlime".disable_chase_state()
|
||||
is_enemies_speed_adjustment_per_level = false
|
||||
|
||||
$"/root/Game/Audio/NextLevelSound".play()
|
||||
|
||||
var map_level := _get_map_level()
|
||||
var level_scene_path = get_level_scene_path(map_level)
|
||||
$"/root/Game/Interface/SceneTransitionRect".transition_to(level_scene_path)
|
||||
|
||||
current_chest_score_index = 0
|
||||
#has_game_started = false
|
||||
|
||||
return
|
||||
|
||||
|
||||
func _get_map_level() -> int:
|
||||
var map_level := current_level % MAX_LEVEL_MAPS
|
||||
return MAX_LEVEL_MAPS if map_level == 0 else map_level
|
||||
|
||||
|
||||
func get_level_scene_path(level: int) -> String:
|
||||
return "res://levels/Level_" + str(level) + ".tscn"
|
||||
540
levels/Level_1.tscn
Normal file
|
|
@ -0,0 +1,540 @@
|
|||
[gd_scene load_steps=40 format=2]
|
||||
|
||||
[ext_resource path="res://world/map_generated/MapGenerated.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://world/markers/Markers.gd" type="Script" id=2]
|
||||
[ext_resource path="res://world/overlay/treasure/misc_treasure/MiscTreasure.png" type="Texture" id=3]
|
||||
[ext_resource path="res://world/door/DoorFore.gd" type="Script" id=4]
|
||||
[ext_resource path="res://world/overlay/treasure/Treasure.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://world/dungeon/Dungeon.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_1.png" type="Texture" id=9]
|
||||
[ext_resource path="res://world/door/Doors.tres" type="TileSet" id=10]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_2.png" type="Texture" id=11]
|
||||
[ext_resource path="res://world/markers/Markers.tres" type="TileSet" id=12]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_4.png" type="Texture" id=13]
|
||||
[ext_resource path="res://world/foreground/Foreground.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_5.png" type="Texture" id=15]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://world/door/DoorBack.gd" type="Script" id=17]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.tscn" type="PackedScene" id=19]
|
||||
[ext_resource path="res://player/Player.gd" type="Script" id=20]
|
||||
[ext_resource path="res://enemy/ai/EnemyAI.gd" type="Script" id=21]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.gd" type="Script" id=22]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.gd" type="Script" id=23]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.gd" type="Script" id=24]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.gd" type="Script" id=25]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_0.png" type="Texture" id=26]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_3.png" type="Texture" id=27]
|
||||
[ext_resource path="res://world/overlay/Overlay.png" type="Texture" id=28]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainBlood.tres" type="Texture" id=29]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainWater.tres" type="Texture" id=30]
|
||||
[ext_resource path="res://world/overlay/Overlay.tscn" type="PackedScene" id=31]
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=1]
|
||||
flags = 4
|
||||
frames = 10
|
||||
frame_0/texture = ExtResource( 26 )
|
||||
frame_0/delay_sec = 6.5
|
||||
frame_1/texture = ExtResource( 9 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = ExtResource( 11 )
|
||||
frame_2/delay_sec = 0.0
|
||||
frame_3/texture = ExtResource( 27 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = ExtResource( 13 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/texture = ExtResource( 15 )
|
||||
frame_5/delay_sec = 2.0
|
||||
frame_6/texture = ExtResource( 13 )
|
||||
frame_6/delay_sec = 0.0
|
||||
frame_7/texture = ExtResource( 27 )
|
||||
frame_7/delay_sec = 0.0
|
||||
frame_8/texture = ExtResource( 11 )
|
||||
frame_8/delay_sec = 0.0
|
||||
frame_9/texture = ExtResource( 9 )
|
||||
frame_9/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=2]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_chest_0.png-560c18dda9040ff612e2ebe66a02172d.stex"
|
||||
|
||||
[sub_resource type="StreamTexture" id=3]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_chest_1.png-4aeb901bba998385d767e010b998fd4b.stex"
|
||||
|
||||
[sub_resource type="StreamTexture" id=4]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_chest_2.png-9622e2c8b849f51151f631e9f506139f.stex"
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=5]
|
||||
flags = 4
|
||||
frames = 6
|
||||
frame_0/texture = SubResource( 2 )
|
||||
frame_0/delay_sec = 5.0
|
||||
frame_1/texture = SubResource( 3 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = SubResource( 4 )
|
||||
frame_2/delay_sec = 1.0
|
||||
frame_3/texture = SubResource( 3 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = SubResource( 2 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=6]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_potion.png-8f25edf6af9a8dcf25e331018982ecc0.stex"
|
||||
|
||||
[sub_resource type="TileSet" id=7]
|
||||
resource_local_to_scene = true
|
||||
0/name = "AnimatedBarSide.tres 0"
|
||||
0/texture = SubResource( 1 )
|
||||
0/tex_offset = Vector2( 0, 0 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 1, 21, 20 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
3/name = "AnimatedTreasure.tres 3"
|
||||
3/texture = SubResource( 5 )
|
||||
3/tex_offset = Vector2( 0, 0 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 0, 0, 20, 20 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "treasure_potion.png 4"
|
||||
4/texture = SubResource( 6 )
|
||||
4/tex_offset = Vector2( 0, 0 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 0, 0, 20, 20 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "FountainWater.tres 5"
|
||||
5/texture = ExtResource( 30 )
|
||||
5/tex_offset = Vector2( 0, 0 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 0, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "Overlay.png 6"
|
||||
6/texture = ExtResource( 28 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 0, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "FountainBlood.tres 7"
|
||||
7/texture = ExtResource( 29 )
|
||||
7/tex_offset = Vector2( 0, 0 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 0, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "Overlay.png 8"
|
||||
8/texture = ExtResource( 28 )
|
||||
8/tex_offset = Vector2( 0, 0 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 20, 0, 20, 20 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "Overlay.png 9"
|
||||
9/texture = ExtResource( 28 )
|
||||
9/tex_offset = Vector2( 0, 0 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 40, 0, 20, 20 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "Overlay.png 10"
|
||||
10/texture = ExtResource( 28 )
|
||||
10/tex_offset = Vector2( 0, 0 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 60, 0, 20, 20 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
11/name = "Overlay.png 11"
|
||||
11/texture = ExtResource( 28 )
|
||||
11/tex_offset = Vector2( 0, 0 )
|
||||
11/modulate = Color( 1, 1, 1, 1 )
|
||||
11/region = Rect2( 80, 0, 20, 20 )
|
||||
11/tile_mode = 0
|
||||
11/occluder_offset = Vector2( 0, 0 )
|
||||
11/navigation_offset = Vector2( 0, 0 )
|
||||
11/shape_offset = Vector2( 0, 0 )
|
||||
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
11/shape_one_way = false
|
||||
11/shape_one_way_margin = 0.0
|
||||
11/shapes = [ ]
|
||||
11/z_index = 0
|
||||
12/name = "Overlay.png 12"
|
||||
12/texture = ExtResource( 28 )
|
||||
12/tex_offset = Vector2( 0, 0 )
|
||||
12/modulate = Color( 1, 1, 1, 1 )
|
||||
12/region = Rect2( 20, 20, 20, 20 )
|
||||
12/tile_mode = 0
|
||||
12/occluder_offset = Vector2( 0, 0 )
|
||||
12/navigation_offset = Vector2( 0, 0 )
|
||||
12/shape_offset = Vector2( 0, 0 )
|
||||
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
12/shape_one_way = false
|
||||
12/shape_one_way_margin = 0.0
|
||||
12/shapes = [ ]
|
||||
12/z_index = 0
|
||||
13/name = "Overlay.png 13"
|
||||
13/texture = ExtResource( 28 )
|
||||
13/tex_offset = Vector2( 0, 0 )
|
||||
13/modulate = Color( 1, 1, 1, 1 )
|
||||
13/region = Rect2( 40, 20, 20, 20 )
|
||||
13/tile_mode = 0
|
||||
13/occluder_offset = Vector2( 0, 0 )
|
||||
13/navigation_offset = Vector2( 0, 0 )
|
||||
13/shape_offset = Vector2( 0, 0 )
|
||||
13/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
13/shape_one_way = false
|
||||
13/shape_one_way_margin = 0.0
|
||||
13/shapes = [ ]
|
||||
13/z_index = 0
|
||||
14/name = "Overlay.png 14"
|
||||
14/texture = ExtResource( 28 )
|
||||
14/tex_offset = Vector2( 0, 0 )
|
||||
14/modulate = Color( 1, 1, 1, 1 )
|
||||
14/region = Rect2( 60, 20, 20, 20 )
|
||||
14/tile_mode = 0
|
||||
14/occluder_offset = Vector2( 0, 0 )
|
||||
14/navigation_offset = Vector2( 0, 0 )
|
||||
14/shape_offset = Vector2( 0, 0 )
|
||||
14/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
14/shape_one_way = false
|
||||
14/shape_one_way_margin = 0.0
|
||||
14/shapes = [ ]
|
||||
14/z_index = 0
|
||||
15/name = "Overlay.png 15"
|
||||
15/texture = ExtResource( 28 )
|
||||
15/tex_offset = Vector2( 0, 0 )
|
||||
15/modulate = Color( 1, 1, 1, 1 )
|
||||
15/region = Rect2( 60, 40, 20, 20 )
|
||||
15/tile_mode = 0
|
||||
15/occluder_offset = Vector2( 0, 0 )
|
||||
15/navigation_offset = Vector2( 0, 0 )
|
||||
15/shape_offset = Vector2( 0, 0 )
|
||||
15/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
15/shape_one_way = false
|
||||
15/shape_one_way_margin = 0.0
|
||||
15/shapes = [ ]
|
||||
15/z_index = 0
|
||||
|
||||
[sub_resource type="TileSet" id=8]
|
||||
resource_local_to_scene = true
|
||||
0/name = "MiscTreasure.png 0"
|
||||
0/texture = ExtResource( 3 )
|
||||
0/tex_offset = Vector2( 0, -20 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 0, 20, 40 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
1/name = "MiscTreasure.png 1"
|
||||
1/texture = ExtResource( 3 )
|
||||
1/tex_offset = Vector2( 0, -20 )
|
||||
1/modulate = Color( 1, 1, 1, 1 )
|
||||
1/region = Rect2( 20, 0, 20, 40 )
|
||||
1/tile_mode = 0
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
1/shape_one_way = false
|
||||
1/shape_one_way_margin = 0.0
|
||||
1/shapes = [ ]
|
||||
1/z_index = 0
|
||||
2/name = "MiscTreasure.png 2"
|
||||
2/texture = ExtResource( 3 )
|
||||
2/tex_offset = Vector2( 0, -20 )
|
||||
2/modulate = Color( 1, 1, 1, 1 )
|
||||
2/region = Rect2( 40, 0, 20, 40 )
|
||||
2/tile_mode = 0
|
||||
2/occluder_offset = Vector2( 0, 0 )
|
||||
2/navigation_offset = Vector2( 0, 0 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
2/shape_one_way = false
|
||||
2/shape_one_way_margin = 0.0
|
||||
2/shapes = [ ]
|
||||
2/z_index = 0
|
||||
3/name = "MiscTreasure.png 3"
|
||||
3/texture = ExtResource( 3 )
|
||||
3/tex_offset = Vector2( 0, -20 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 60, 0, 20, 40 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "MiscTreasure.png 4"
|
||||
4/texture = ExtResource( 3 )
|
||||
4/tex_offset = Vector2( 0, -20 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 80, 0, 20, 40 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "MiscTreasure.png 5"
|
||||
5/texture = ExtResource( 3 )
|
||||
5/tex_offset = Vector2( 0, -20 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 100, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "MiscTreasure.png 6"
|
||||
6/texture = ExtResource( 3 )
|
||||
6/tex_offset = Vector2( 0, -20 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 120, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "MiscTreasure.png 7"
|
||||
7/texture = ExtResource( 3 )
|
||||
7/tex_offset = Vector2( 0, -20 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 140, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "MiscTreasure.png 8"
|
||||
8/texture = ExtResource( 3 )
|
||||
8/tex_offset = Vector2( 0, -20 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 160, 0, 20, 40 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "MiscTreasure.png 9"
|
||||
9/texture = ExtResource( 3 )
|
||||
9/tex_offset = Vector2( 0, -20 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 180, 0, 20, 40 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "MiscTreasure.png 10"
|
||||
10/texture = ExtResource( 3 )
|
||||
10/tex_offset = Vector2( 0, -20 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 200, 0, 20, 40 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
|
||||
[node name="Level1" type="Navigation2D"]
|
||||
|
||||
[node name="Dungeon" parent="." instance=ExtResource( 8 )]
|
||||
tile_data = PoolIntArray( 65536, 13, 0, 65537, 6, 0, 65538, 6, 0, 65539, 6, 0, 65540, 6, 0, 65541, 0, 0, 65542, 0, 0, 65543, 6, 0, 65544, 6, 0, 65545, 6, 0, 65546, 6, 0, 65547, 6, 0, 65548, 6, 0, 65549, 6, 0, 65550, 6, 0, 65551, 5, 0, 65552, 8, 0, 131072, 13, 0, 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 131088, 8, 0, 196608, 13, 0, 196609, 1, 0, 196610, 6, 0, 196611, 4, 0, 196612, 7, 0, 196613, 1, 0, 196614, 5, 0, 196615, 4, 0, 196616, 7, 0, 196617, 1, 0, 196618, 5, 0, 196619, 1, 0, 196620, 5, 0, 196621, 1, 0, 196622, 5, 0, 196623, 0, 0, 196624, 8, 0, 262144, 13, 0, 262145, 0, 0, 262146, 2, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 2, 0, 262151, 0, 0, 262152, 2, 0, 262153, 0, 0, 262154, 2, 0, 262155, 0, 0, 262156, 2, 0, 262157, 0, 0, 262158, 2, 0, 262159, 0, 0, 262160, 8, 0, 393215, 6, 0, 327680, 6, 0, 327681, 1, 0, 327682, 6, 0, 327683, 4, 0, 327684, 18, 0, 327685, 1, 0, 327686, 18, 0, 327687, 21, 0, 327688, 5, 0, 327689, 21, 0, 327690, 18, 0, 327691, 1, 0, 327692, 18, 0, 327693, 1, 0, 327694, 6, 0, 327695, 4, 0, 327696, 4, 0, 327697, 6, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 0, 0, 393219, 0, 0, 393220, 19, 0, 393221, 0, 0, 393222, 19, 0, 393223, 0, 0, 393224, 0, 0, 393225, 0, 0, 393226, 19, 0, 393227, 0, 0, 393228, 19, 0, 393229, 0, 0, 393230, 2, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 524287, 6, 0, 458752, 17, 0, 458753, 1, 0, 458754, 5, 0, 458755, 0, 0, 458756, 20, 0, 458757, 0, 0, 458758, 20, 0, 458759, 21, 0, 458760, 5, 0, 458761, 21, 0, 458762, 20, 0, 458763, 1, 0, 458764, 20, 0, 458765, 1, 0, 458766, 5, 0, 458767, 1, 0, 458768, 12, 0, 458769, 6, 0, 524288, 13, 0, 524289, 0, 0, 524290, 2, 0, 524291, 0, 0, 524292, 2, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 8, 0, 589824, 13, 0, 589825, 1, 0, 589826, 6, 0, 589827, 5, 0, 589828, 7, 0, 589829, 0, 0, 589830, 5, 0, 589831, 1, 0, 589832, 5, 0, 589833, 1, 0, 589834, 5, 0, 589835, 1, 0, 589836, 5, 0, 589837, 1, 0, 589838, 5, 0, 589839, 1, 0, 589840, 8, 0, 655360, 13, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 8, 0, 720896, 15, 0, 720897, 6, 0, 720898, 4, 0, 720899, 4, 0, 720900, 4, 0, 720901, 4, 0, 720902, 4, 0, 720903, 4, 0, 720904, 4, 0, 720905, 4, 0, 720906, 4, 0, 720907, 4, 0, 720908, 4, 0, 720909, 0, 0, 720910, 0, 0, 720911, 6, 0, 720912, 10, 0, 786445, 3, 0 )
|
||||
|
||||
[node name="OverlayZ1Fountain" parent="." instance=ExtResource( 31 )]
|
||||
z_index = 1
|
||||
tile_set = SubResource( 7 )
|
||||
tile_data = PoolIntArray( 196610, 6, 0, 196620, 5, 0, 196622, 6, 0, 589826, 6, 0, 589838, 6, 0 )
|
||||
script = null
|
||||
|
||||
[node name="Overlay" parent="." instance=ExtResource( 31 )]
|
||||
z_index = 3
|
||||
tile_set = SubResource( 7 )
|
||||
tile_data = PoolIntArray( 65539, 8, 0, 65543, 8, 0, 65547, 13, 0, 196610, 6, 0, 327681, 0, 0, 327683, 14, 0, 327693, 0, 0, 393219, 15, 0, 458753, 0, 0, 458755, 0, 0, 458757, 0, 0, 458763, 0, 0, 458765, 0, 0, 589826, 6, 0, 589829, 0, 0 )
|
||||
|
||||
[node name="Treasure" parent="." instance=ExtResource( 5 )]
|
||||
tile_data = PoolIntArray( 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 196609, 0, 0, 196613, 0, 0, 196617, 0, 0, 196619, 0, 0, 196621, 0, 0, 196623, 0, 0, 262145, 0, 0, 262146, 0, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 262151, 0, 0, 262152, 0, 0, 262153, 0, 0, 262154, 0, 0, 262155, 0, 0, 262156, 0, 0, 262157, 0, 0, 262158, 0, 0, 262159, 0, 0, 327681, 0, 0, 327685, 0, 0, 327691, 0, 0, 327693, 0, 0, 393218, 0, 0, 393219, 0, 0, 393221, 0, 0, 393224, 1, 0, 393227, 0, 0, 393229, 0, 0, 393230, 0, 0, 458753, 0, 0, 458755, 0, 0, 458757, 0, 0, 458763, 0, 0, 458765, 0, 0, 458767, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 2, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 589825, 0, 0, 589829, 0, 0, 589831, 0, 0, 589833, 0, 0, 589835, 0, 0, 589837, 0, 0, 589839, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0 )
|
||||
|
||||
[node name="Markers" type="TileMap" parent="."]
|
||||
z_index = 5
|
||||
tile_set = ExtResource( 12 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 327681, 4, 0, 327687, 2, 0, 327689, 4, 0, 327693, 3, 0, 458751, 10, 0, 393233, 9, 0, 458753, 2, 0, 458755, 5, 0, 458757, 1, 0, 458759, 0, 0, 458761, 0, 0, 458763, 1, 0, 458765, 2, 0, 589829, 3, 0, 655373, 8, 0 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Foreground" parent="." instance=ExtResource( 14 )]
|
||||
tile_data = PoolIntArray( 131074, 1, 0, 131084, 0, 0, 131086, 1, 0, 524290, 1, 0, 524302, 1, 0 )
|
||||
|
||||
[node name="DoorBack" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65540, 3, 0, 720908, 3, 0 )
|
||||
script = ExtResource( 17 )
|
||||
|
||||
[node name="DoorFore" type="TileMap" parent="."]
|
||||
z_index = 10
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 4, 2, 0, 655372, 2, 0 )
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 6 )]
|
||||
position = Vector2( 271, 242 )
|
||||
z_index = 7
|
||||
z_as_relative = true
|
||||
script = ExtResource( 20 )
|
||||
|
||||
[node name="EnemyAI" type="Node2D" parent="."]
|
||||
position = Vector2( -1, 0 )
|
||||
script = ExtResource( 21 )
|
||||
|
||||
[node name="EnemyFiend" parent="EnemyAI" instance=ExtResource( 7 )]
|
||||
position = Vector2( 30, 53 )
|
||||
z_index = 8
|
||||
z_as_relative = false
|
||||
script = ExtResource( 23 )
|
||||
|
||||
[node name="EnemyLizardMan" parent="EnemyAI" instance=ExtResource( 19 )]
|
||||
position = Vector2( 330, 128 )
|
||||
z_index = 8
|
||||
z_as_relative = false
|
||||
script = ExtResource( 22 )
|
||||
|
||||
[node name="EnemyOgre" parent="EnemyAI" instance=ExtResource( 18 )]
|
||||
position = Vector2( 9, 132 )
|
||||
z_index = 8
|
||||
script = ExtResource( 24 )
|
||||
|
||||
[node name="EnemySlime" parent="EnemyAI" instance=ExtResource( 16 )]
|
||||
position = Vector2( 309, 52 )
|
||||
z_index = 8
|
||||
script = ExtResource( 25 )
|
||||
|
||||
[node name="MapGenerated" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
[node name="WallBlades" parent="MapGenerated" index="0"]
|
||||
z_index = 2
|
||||
z_as_relative = false
|
||||
|
||||
[node name="MagicWalls" parent="MapGenerated" index="2"]
|
||||
z_index = 5
|
||||
|
||||
[node name="MiscTreasure" parent="MapGenerated" index="3"]
|
||||
tile_set = SubResource( 8 )
|
||||
|
||||
[editable path="MapGenerated"]
|
||||
527
levels/Level_2.tscn
Normal file
|
|
@ -0,0 +1,527 @@
|
|||
[gd_scene load_steps=40 format=2]
|
||||
|
||||
[ext_resource path="res://world/map_generated/MapGenerated.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://world/markers/Markers.gd" type="Script" id=2]
|
||||
[ext_resource path="res://world/overlay/treasure/misc_treasure/MiscTreasure.png" type="Texture" id=3]
|
||||
[ext_resource path="res://world/door/DoorFore.gd" type="Script" id=4]
|
||||
[ext_resource path="res://world/overlay/treasure/Treasure.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://world/dungeon/Dungeon.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_1.png" type="Texture" id=9]
|
||||
[ext_resource path="res://world/door/Doors.tres" type="TileSet" id=10]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_2.png" type="Texture" id=11]
|
||||
[ext_resource path="res://world/markers/Markers.tres" type="TileSet" id=12]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_4.png" type="Texture" id=13]
|
||||
[ext_resource path="res://world/foreground/Foreground.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_5.png" type="Texture" id=15]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://world/door/DoorBack.gd" type="Script" id=17]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.tscn" type="PackedScene" id=19]
|
||||
[ext_resource path="res://player/Player.gd" type="Script" id=20]
|
||||
[ext_resource path="res://enemy/ai/EnemyAI.gd" type="Script" id=21]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.gd" type="Script" id=22]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.gd" type="Script" id=23]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.gd" type="Script" id=24]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.gd" type="Script" id=25]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_0.png" type="Texture" id=26]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_3.png" type="Texture" id=27]
|
||||
[ext_resource path="res://world/overlay/Overlay.png" type="Texture" id=28]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainBlood.tres" type="Texture" id=29]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainWater.tres" type="Texture" id=30]
|
||||
[ext_resource path="res://world/overlay/Overlay.tscn" type="PackedScene" id=31]
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=1]
|
||||
flags = 4
|
||||
frames = 10
|
||||
frame_0/texture = ExtResource( 26 )
|
||||
frame_0/delay_sec = 6.5
|
||||
frame_1/texture = ExtResource( 9 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = ExtResource( 11 )
|
||||
frame_2/delay_sec = 0.0
|
||||
frame_3/texture = ExtResource( 27 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = ExtResource( 13 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/texture = ExtResource( 15 )
|
||||
frame_5/delay_sec = 2.0
|
||||
frame_6/texture = ExtResource( 13 )
|
||||
frame_6/delay_sec = 0.0
|
||||
frame_7/texture = ExtResource( 27 )
|
||||
frame_7/delay_sec = 0.0
|
||||
frame_8/texture = ExtResource( 11 )
|
||||
frame_8/delay_sec = 0.0
|
||||
frame_9/texture = ExtResource( 9 )
|
||||
frame_9/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=2]
|
||||
flags = 4
|
||||
|
||||
[sub_resource type="StreamTexture" id=3]
|
||||
flags = 4
|
||||
|
||||
[sub_resource type="StreamTexture" id=4]
|
||||
flags = 4
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=5]
|
||||
flags = 4
|
||||
frames = 6
|
||||
frame_0/texture = SubResource( 2 )
|
||||
frame_0/delay_sec = 5.0
|
||||
frame_1/texture = SubResource( 3 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = SubResource( 4 )
|
||||
frame_2/delay_sec = 1.0
|
||||
frame_3/texture = SubResource( 3 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = SubResource( 2 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=6]
|
||||
flags = 4
|
||||
|
||||
[sub_resource type="TileSet" id=7]
|
||||
resource_local_to_scene = true
|
||||
0/name = "AnimatedBarSide.tres 0"
|
||||
0/texture = SubResource( 1 )
|
||||
0/tex_offset = Vector2( 0, 0 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 1, 21, 20 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
3/name = "AnimatedTreasure.tres 3"
|
||||
3/texture = SubResource( 5 )
|
||||
3/tex_offset = Vector2( 0, 0 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 0, 0, 20, 20 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "treasure_potion.png 4"
|
||||
4/texture = SubResource( 6 )
|
||||
4/tex_offset = Vector2( 0, 0 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 0, 0, 20, 20 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "FountainWater.tres 5"
|
||||
5/texture = ExtResource( 30 )
|
||||
5/tex_offset = Vector2( 0, 0 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 0, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "Overlay.png 6"
|
||||
6/texture = ExtResource( 28 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 0, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "FountainBlood.tres 7"
|
||||
7/texture = ExtResource( 29 )
|
||||
7/tex_offset = Vector2( 0, 0 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 0, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "Overlay.png 8"
|
||||
8/texture = ExtResource( 28 )
|
||||
8/tex_offset = Vector2( 0, 0 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 20, 0, 20, 20 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "Overlay.png 9"
|
||||
9/texture = ExtResource( 28 )
|
||||
9/tex_offset = Vector2( 0, 0 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 40, 0, 20, 20 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "Overlay.png 10"
|
||||
10/texture = ExtResource( 28 )
|
||||
10/tex_offset = Vector2( 0, 0 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 60, 0, 20, 20 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
11/name = "Overlay.png 11"
|
||||
11/texture = ExtResource( 28 )
|
||||
11/tex_offset = Vector2( 0, 0 )
|
||||
11/modulate = Color( 1, 1, 1, 1 )
|
||||
11/region = Rect2( 80, 0, 20, 20 )
|
||||
11/tile_mode = 0
|
||||
11/occluder_offset = Vector2( 0, 0 )
|
||||
11/navigation_offset = Vector2( 0, 0 )
|
||||
11/shape_offset = Vector2( 0, 0 )
|
||||
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
11/shape_one_way = false
|
||||
11/shape_one_way_margin = 0.0
|
||||
11/shapes = [ ]
|
||||
11/z_index = 0
|
||||
12/name = "Overlay.png 12"
|
||||
12/texture = ExtResource( 28 )
|
||||
12/tex_offset = Vector2( 0, 0 )
|
||||
12/modulate = Color( 1, 1, 1, 1 )
|
||||
12/region = Rect2( 20, 20, 20, 20 )
|
||||
12/tile_mode = 0
|
||||
12/occluder_offset = Vector2( 0, 0 )
|
||||
12/navigation_offset = Vector2( 0, 0 )
|
||||
12/shape_offset = Vector2( 0, 0 )
|
||||
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
12/shape_one_way = false
|
||||
12/shape_one_way_margin = 0.0
|
||||
12/shapes = [ ]
|
||||
12/z_index = 0
|
||||
13/name = "Overlay.png 13"
|
||||
13/texture = ExtResource( 28 )
|
||||
13/tex_offset = Vector2( 0, 0 )
|
||||
13/modulate = Color( 1, 1, 1, 1 )
|
||||
13/region = Rect2( 40, 20, 20, 20 )
|
||||
13/tile_mode = 0
|
||||
13/occluder_offset = Vector2( 0, 0 )
|
||||
13/navigation_offset = Vector2( 0, 0 )
|
||||
13/shape_offset = Vector2( 0, 0 )
|
||||
13/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
13/shape_one_way = false
|
||||
13/shape_one_way_margin = 0.0
|
||||
13/shapes = [ ]
|
||||
13/z_index = 0
|
||||
14/name = "Overlay.png 14"
|
||||
14/texture = ExtResource( 28 )
|
||||
14/tex_offset = Vector2( 0, 0 )
|
||||
14/modulate = Color( 1, 1, 1, 1 )
|
||||
14/region = Rect2( 60, 20, 20, 20 )
|
||||
14/tile_mode = 0
|
||||
14/occluder_offset = Vector2( 0, 0 )
|
||||
14/navigation_offset = Vector2( 0, 0 )
|
||||
14/shape_offset = Vector2( 0, 0 )
|
||||
14/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
14/shape_one_way = false
|
||||
14/shape_one_way_margin = 0.0
|
||||
14/shapes = [ ]
|
||||
14/z_index = 0
|
||||
15/name = "Overlay.png 15"
|
||||
15/texture = ExtResource( 28 )
|
||||
15/tex_offset = Vector2( 0, 0 )
|
||||
15/modulate = Color( 1, 1, 1, 1 )
|
||||
15/region = Rect2( 60, 40, 20, 20 )
|
||||
15/tile_mode = 0
|
||||
15/occluder_offset = Vector2( 0, 0 )
|
||||
15/navigation_offset = Vector2( 0, 0 )
|
||||
15/shape_offset = Vector2( 0, 0 )
|
||||
15/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
15/shape_one_way = false
|
||||
15/shape_one_way_margin = 0.0
|
||||
15/shapes = [ ]
|
||||
15/z_index = 0
|
||||
|
||||
[sub_resource type="TileSet" id=8]
|
||||
resource_local_to_scene = true
|
||||
0/name = "MiscTreasure.png 0"
|
||||
0/texture = ExtResource( 3 )
|
||||
0/tex_offset = Vector2( 0, -20 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 0, 20, 40 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
1/name = "MiscTreasure.png 1"
|
||||
1/texture = ExtResource( 3 )
|
||||
1/tex_offset = Vector2( 0, -20 )
|
||||
1/modulate = Color( 1, 1, 1, 1 )
|
||||
1/region = Rect2( 20, 0, 20, 40 )
|
||||
1/tile_mode = 0
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
1/shape_one_way = false
|
||||
1/shape_one_way_margin = 0.0
|
||||
1/shapes = [ ]
|
||||
1/z_index = 0
|
||||
2/name = "MiscTreasure.png 2"
|
||||
2/texture = ExtResource( 3 )
|
||||
2/tex_offset = Vector2( 0, -20 )
|
||||
2/modulate = Color( 1, 1, 1, 1 )
|
||||
2/region = Rect2( 40, 0, 20, 40 )
|
||||
2/tile_mode = 0
|
||||
2/occluder_offset = Vector2( 0, 0 )
|
||||
2/navigation_offset = Vector2( 0, 0 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
2/shape_one_way = false
|
||||
2/shape_one_way_margin = 0.0
|
||||
2/shapes = [ ]
|
||||
2/z_index = 0
|
||||
3/name = "MiscTreasure.png 3"
|
||||
3/texture = ExtResource( 3 )
|
||||
3/tex_offset = Vector2( 0, -20 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 60, 0, 20, 40 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "MiscTreasure.png 4"
|
||||
4/texture = ExtResource( 3 )
|
||||
4/tex_offset = Vector2( 0, -20 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 80, 0, 20, 40 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "MiscTreasure.png 5"
|
||||
5/texture = ExtResource( 3 )
|
||||
5/tex_offset = Vector2( 0, -20 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 100, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "MiscTreasure.png 6"
|
||||
6/texture = ExtResource( 3 )
|
||||
6/tex_offset = Vector2( 0, -20 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 120, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "MiscTreasure.png 7"
|
||||
7/texture = ExtResource( 3 )
|
||||
7/tex_offset = Vector2( 0, -20 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 140, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "MiscTreasure.png 8"
|
||||
8/texture = ExtResource( 3 )
|
||||
8/tex_offset = Vector2( 0, -20 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 160, 0, 20, 40 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "MiscTreasure.png 9"
|
||||
9/texture = ExtResource( 3 )
|
||||
9/tex_offset = Vector2( 0, -20 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 180, 0, 20, 40 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "MiscTreasure.png 10"
|
||||
10/texture = ExtResource( 3 )
|
||||
10/tex_offset = Vector2( 0, -20 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 200, 0, 20, 40 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
|
||||
[node name="Level2" type="Navigation2D"]
|
||||
|
||||
[node name="Dungeon" parent="." instance=ExtResource( 8 )]
|
||||
tile_data = PoolIntArray( 65536, 13, 0, 65537, 4, 0, 65538, 4, 0, 65539, 4, 0, 65540, 4, 0, 65541, 4, 0, 65542, 27, 0, 65543, 4, 0, 65544, 4, 0, 65545, 4, 0, 65546, 4, 0, 65547, 6, 0, 65548, 0, 0, 65549, 0, 0, 65550, 6, 0, 65551, 5, 0, 65552, 8, 0, 131072, 13, 0, 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 19, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 2, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 2, 0, 131087, 0, 0, 131088, 8, 0, 196608, 13, 0, 196609, 1, 0, 196610, 5, 0, 196611, 0, 0, 196612, 5, 0, 196613, 1, 0, 196614, 5, 0, 196615, 1, 0, 196616, 5, 0, 196617, 1, 0, 196618, 6, 0, 196619, 4, 0, 196620, 7, 0, 196621, 1, 0, 196622, 5, 0, 196623, 0, 0, 196624, 8, 0, 262144, 13, 0, 262145, 0, 0, 262146, 0, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 262151, 0, 0, 262152, 2, 0, 262153, 0, 0, 262154, 0, 0, 262155, 0, 0, 262156, 0, 0, 262157, 0, 0, 262158, 2, 0, 262159, 0, 0, 262160, 8, 0, 393215, 6, 0, 327680, 7, 0, 327681, 0, 0, 327682, 23, 0, 327683, 23, 0, 327684, 23, 0, 327685, 23, 0, 327686, 23, 0, 327687, 0, 0, 327688, 18, 0, 327689, 4, 0, 327690, 7, 0, 327691, 21, 0, 327692, 6, 0, 327693, 4, 0, 327694, 18, 0, 327695, 1, 0, 327696, 5, 0, 327697, 6, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 21, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 21, 0, 393223, 0, 0, 393224, 19, 0, 393225, 0, 0, 393226, 0, 0, 393227, 0, 0, 393228, 2, 0, 393229, 0, 0, 393230, 20, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 524287, 6, 0, 458752, 17, 0, 458753, 0, 0, 458754, 23, 0, 458755, 23, 0, 458756, 23, 0, 458757, 23, 0, 458758, 23, 0, 458759, 0, 0, 458760, 20, 0, 458761, 1, 0, 458762, 5, 0, 458763, 0, 0, 458764, 18, 0, 458765, 0, 0, 458766, 2, 0, 458767, 0, 0, 458768, 12, 0, 458769, 6, 0, 524288, 13, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 20, 0, 524301, 0, 0, 524302, 18, 0, 524303, 0, 0, 524304, 8, 0, 589824, 13, 0, 589825, 1, 0, 589826, 6, 0, 589827, 7, 0, 589828, 1, 0, 589829, 5, 0, 589830, 0, 0, 589831, 5, 0, 589832, 1, 0, 589833, 6, 0, 589834, 7, 0, 589835, 0, 0, 589836, 2, 0, 589837, 0, 0, 589838, 20, 0, 589839, 0, 0, 589840, 8, 0, 655360, 13, 0, 655361, 0, 0, 655362, 0, 0, 655363, 2, 0, 655364, 0, 0, 655365, 2, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 2, 0, 655371, 0, 0, 655372, 18, 0, 655373, 0, 0, 655374, 2, 0, 655375, 0, 0, 655376, 8, 0, 720896, 15, 0, 720897, 6, 0, 720898, 4, 0, 720899, 4, 0, 720900, 4, 0, 720901, 4, 0, 720902, 4, 0, 720903, 0, 0, 720904, 0, 0, 720905, 4, 0, 720906, 4, 0, 720907, 4, 0, 720908, 28, 0, 720909, 4, 0, 720910, 4, 0, 720911, 6, 0, 720912, 10, 0, 786439, 3, 0 )
|
||||
|
||||
[node name="Treasure" parent="." instance=ExtResource( 5 )]
|
||||
tile_data = PoolIntArray( 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 196609, 0, 0, 196611, 0, 0, 196613, 0, 0, 196615, 0, 0, 196617, 0, 0, 196621, 0, 0, 196623, 0, 0, 262145, 0, 0, 262146, 0, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 262151, 0, 0, 262152, 0, 0, 262153, 0, 0, 262154, 0, 0, 262155, 2, 0, 262156, 0, 0, 262157, 0, 0, 262158, 0, 0, 262159, 0, 0, 327681, 0, 0, 327687, 0, 0, 327695, 0, 0, 393217, 0, 0, 393220, 1, 0, 393223, 0, 0, 393225, 0, 0, 393226, 0, 0, 393227, 0, 0, 393228, 0, 0, 393229, 0, 0, 393231, 0, 0, 458753, 0, 0, 458759, 0, 0, 458761, 0, 0, 458763, 0, 0, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524301, 0, 0, 524303, 0, 0, 589825, 0, 0, 589828, 0, 0, 589830, 0, 0, 589832, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589839, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0 )
|
||||
|
||||
[node name="Overlay" parent="." instance=ExtResource( 31 )]
|
||||
z_index = 3
|
||||
tile_set = SubResource( 7 )
|
||||
tile_data = PoolIntArray( 65546, 11, 0, 65550, 11, 0, 196610, 6, 0, 196612, 6, 0, 196613, 0, 0, 196621, 0, 0, 458762, 6, 0, 458763, 0, 0, 524303, 0, 0, 589825, 0, 0, 589826, 6, 0, 589828, 0, 0 )
|
||||
|
||||
[node name="Markers" type="TileMap" parent="."]
|
||||
z_index = 5
|
||||
tile_set = ExtResource( 12 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 196613, 2, 0, 196621, 2, 0, 327691, 1, 0, 458751, 10, 0, 393218, 1, 0, 393222, 0, 0, 393233, 9, 0, 458763, 3, 0, 524303, 4, 0, 589825, 3, 0, 589828, 4, 0, 655367, 8, 0 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Foreground" parent="." instance=ExtResource( 14 )]
|
||||
tile_data = PoolIntArray( 131074, 1, 0, 131076, 1, 0, 393226, 1, 0, 524290, 1, 0 )
|
||||
|
||||
[node name="DoorBack" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65547, 3, 0, 720902, 3, 0 )
|
||||
script = ExtResource( 17 )
|
||||
|
||||
[node name="DoorFore" type="TileMap" parent="."]
|
||||
z_index = 10
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 11, 2, 0, 655366, 2, 0 )
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 6 )]
|
||||
position = Vector2( 150, 238 )
|
||||
z_index = 7
|
||||
script = ExtResource( 20 )
|
||||
|
||||
[node name="EnemyAI" type="Node2D" parent="."]
|
||||
position = Vector2( -1, 0 )
|
||||
script = ExtResource( 21 )
|
||||
|
||||
[node name="EnemyFiend" parent="EnemyAI" instance=ExtResource( 7 )]
|
||||
position = Vector2( 30, 53 )
|
||||
z_index = 8
|
||||
script = ExtResource( 23 )
|
||||
|
||||
[node name="EnemyLizardMan" parent="EnemyAI" instance=ExtResource( 19 )]
|
||||
position = Vector2( 330, 128 )
|
||||
z_index = 8
|
||||
script = ExtResource( 22 )
|
||||
|
||||
[node name="EnemyOgre" parent="EnemyAI" instance=ExtResource( 18 )]
|
||||
position = Vector2( 9, 132 )
|
||||
z_index = 8
|
||||
script = ExtResource( 24 )
|
||||
|
||||
[node name="EnemySlime" parent="EnemyAI" instance=ExtResource( 16 )]
|
||||
position = Vector2( 309, 52 )
|
||||
z_index = 8
|
||||
script = ExtResource( 25 )
|
||||
|
||||
[node name="MapGenerated" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
[node name="WallBlades" parent="MapGenerated" index="0"]
|
||||
z_index = 2
|
||||
z_as_relative = false
|
||||
|
||||
[node name="MagicWalls" parent="MapGenerated" index="2"]
|
||||
z_index = 5
|
||||
|
||||
[node name="MiscTreasure" parent="MapGenerated" index="3"]
|
||||
tile_set = SubResource( 8 )
|
||||
|
||||
[editable path="MapGenerated"]
|
||||
531
levels/Level_3.tscn
Normal file
|
|
@ -0,0 +1,531 @@
|
|||
[gd_scene load_steps=40 format=2]
|
||||
|
||||
[ext_resource path="res://world/map_generated/MapGenerated.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://world/markers/Markers.gd" type="Script" id=2]
|
||||
[ext_resource path="res://world/overlay/treasure/misc_treasure/MiscTreasure.png" type="Texture" id=3]
|
||||
[ext_resource path="res://world/door/DoorFore.gd" type="Script" id=4]
|
||||
[ext_resource path="res://world/overlay/treasure/Treasure.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://world/dungeon/Dungeon.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_1.png" type="Texture" id=9]
|
||||
[ext_resource path="res://world/door/Doors.tres" type="TileSet" id=10]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_3.png" type="Texture" id=11]
|
||||
[ext_resource path="res://world/markers/Markers.tres" type="TileSet" id=12]
|
||||
[ext_resource path="res://world/foreground/Foreground.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://world/door/DoorBack.gd" type="Script" id=17]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.tscn" type="PackedScene" id=19]
|
||||
[ext_resource path="res://player/Player.gd" type="Script" id=20]
|
||||
[ext_resource path="res://enemy/ai/EnemyAI.gd" type="Script" id=21]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.gd" type="Script" id=22]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.gd" type="Script" id=23]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.gd" type="Script" id=24]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.gd" type="Script" id=25]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_4.png" type="Texture" id=26]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_0.png" type="Texture" id=27]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_5.png" type="Texture" id=28]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_2.png" type="Texture" id=29]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainWater.tres" type="Texture" id=30]
|
||||
[ext_resource path="res://world/overlay/Overlay.tscn" type="PackedScene" id=31]
|
||||
[ext_resource path="res://world/overlay/Overlay.png" type="Texture" id=32]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainBlood.tres" type="Texture" id=33]
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=1]
|
||||
flags = 4
|
||||
frames = 10
|
||||
frame_0/texture = ExtResource( 27 )
|
||||
frame_0/delay_sec = 6.5
|
||||
frame_1/texture = ExtResource( 9 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = ExtResource( 29 )
|
||||
frame_2/delay_sec = 0.0
|
||||
frame_3/texture = ExtResource( 11 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = ExtResource( 26 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/texture = ExtResource( 28 )
|
||||
frame_5/delay_sec = 2.0
|
||||
frame_6/texture = ExtResource( 26 )
|
||||
frame_6/delay_sec = 0.0
|
||||
frame_7/texture = ExtResource( 11 )
|
||||
frame_7/delay_sec = 0.0
|
||||
frame_8/texture = ExtResource( 29 )
|
||||
frame_8/delay_sec = 0.0
|
||||
frame_9/texture = ExtResource( 9 )
|
||||
frame_9/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=2]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_chest_0.png-560c18dda9040ff612e2ebe66a02172d.stex"
|
||||
|
||||
[sub_resource type="StreamTexture" id=3]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_chest_1.png-4aeb901bba998385d767e010b998fd4b.stex"
|
||||
|
||||
[sub_resource type="StreamTexture" id=4]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_chest_2.png-9622e2c8b849f51151f631e9f506139f.stex"
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=5]
|
||||
flags = 4
|
||||
frames = 6
|
||||
frame_0/texture = SubResource( 2 )
|
||||
frame_0/delay_sec = 5.0
|
||||
frame_1/texture = SubResource( 3 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = SubResource( 4 )
|
||||
frame_2/delay_sec = 1.0
|
||||
frame_3/texture = SubResource( 3 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = SubResource( 2 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=6]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_potion.png-8f25edf6af9a8dcf25e331018982ecc0.stex"
|
||||
|
||||
[sub_resource type="TileSet" id=7]
|
||||
resource_local_to_scene = true
|
||||
0/name = "AnimatedBarSide.tres 0"
|
||||
0/texture = SubResource( 1 )
|
||||
0/tex_offset = Vector2( 0, 0 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 1, 21, 20 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
3/name = "AnimatedTreasure.tres 3"
|
||||
3/texture = SubResource( 5 )
|
||||
3/tex_offset = Vector2( 0, 0 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 0, 0, 20, 20 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "treasure_potion.png 4"
|
||||
4/texture = SubResource( 6 )
|
||||
4/tex_offset = Vector2( 0, 0 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 0, 0, 20, 20 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "FountainWater.tres 5"
|
||||
5/texture = ExtResource( 30 )
|
||||
5/tex_offset = Vector2( 0, 0 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 0, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "Overlay.png 6"
|
||||
6/texture = ExtResource( 32 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 0, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "FountainBlood.tres 7"
|
||||
7/texture = ExtResource( 33 )
|
||||
7/tex_offset = Vector2( 0, 0 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 0, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "Overlay.png 8"
|
||||
8/texture = ExtResource( 32 )
|
||||
8/tex_offset = Vector2( 0, 0 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 20, 0, 20, 20 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "Overlay.png 9"
|
||||
9/texture = ExtResource( 32 )
|
||||
9/tex_offset = Vector2( 0, 0 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 40, 0, 20, 20 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "Overlay.png 10"
|
||||
10/texture = ExtResource( 32 )
|
||||
10/tex_offset = Vector2( 0, 0 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 60, 0, 20, 20 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
11/name = "Overlay.png 11"
|
||||
11/texture = ExtResource( 32 )
|
||||
11/tex_offset = Vector2( 0, 0 )
|
||||
11/modulate = Color( 1, 1, 1, 1 )
|
||||
11/region = Rect2( 80, 0, 20, 20 )
|
||||
11/tile_mode = 0
|
||||
11/occluder_offset = Vector2( 0, 0 )
|
||||
11/navigation_offset = Vector2( 0, 0 )
|
||||
11/shape_offset = Vector2( 0, 0 )
|
||||
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
11/shape_one_way = false
|
||||
11/shape_one_way_margin = 0.0
|
||||
11/shapes = [ ]
|
||||
11/z_index = 0
|
||||
12/name = "Overlay.png 12"
|
||||
12/texture = ExtResource( 32 )
|
||||
12/tex_offset = Vector2( 0, 0 )
|
||||
12/modulate = Color( 1, 1, 1, 1 )
|
||||
12/region = Rect2( 20, 20, 20, 20 )
|
||||
12/tile_mode = 0
|
||||
12/occluder_offset = Vector2( 0, 0 )
|
||||
12/navigation_offset = Vector2( 0, 0 )
|
||||
12/shape_offset = Vector2( 0, 0 )
|
||||
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
12/shape_one_way = false
|
||||
12/shape_one_way_margin = 0.0
|
||||
12/shapes = [ ]
|
||||
12/z_index = 0
|
||||
13/name = "Overlay.png 13"
|
||||
13/texture = ExtResource( 32 )
|
||||
13/tex_offset = Vector2( 0, 0 )
|
||||
13/modulate = Color( 1, 1, 1, 1 )
|
||||
13/region = Rect2( 40, 20, 20, 20 )
|
||||
13/tile_mode = 0
|
||||
13/occluder_offset = Vector2( 0, 0 )
|
||||
13/navigation_offset = Vector2( 0, 0 )
|
||||
13/shape_offset = Vector2( 0, 0 )
|
||||
13/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
13/shape_one_way = false
|
||||
13/shape_one_way_margin = 0.0
|
||||
13/shapes = [ ]
|
||||
13/z_index = 0
|
||||
14/name = "Overlay.png 14"
|
||||
14/texture = ExtResource( 32 )
|
||||
14/tex_offset = Vector2( 0, 0 )
|
||||
14/modulate = Color( 1, 1, 1, 1 )
|
||||
14/region = Rect2( 60, 20, 20, 20 )
|
||||
14/tile_mode = 0
|
||||
14/occluder_offset = Vector2( 0, 0 )
|
||||
14/navigation_offset = Vector2( 0, 0 )
|
||||
14/shape_offset = Vector2( 0, 0 )
|
||||
14/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
14/shape_one_way = false
|
||||
14/shape_one_way_margin = 0.0
|
||||
14/shapes = [ ]
|
||||
14/z_index = 0
|
||||
15/name = "Overlay.png 15"
|
||||
15/texture = ExtResource( 32 )
|
||||
15/tex_offset = Vector2( 0, 0 )
|
||||
15/modulate = Color( 1, 1, 1, 1 )
|
||||
15/region = Rect2( 60, 40, 20, 20 )
|
||||
15/tile_mode = 0
|
||||
15/occluder_offset = Vector2( 0, 0 )
|
||||
15/navigation_offset = Vector2( 0, 0 )
|
||||
15/shape_offset = Vector2( 0, 0 )
|
||||
15/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
15/shape_one_way = false
|
||||
15/shape_one_way_margin = 0.0
|
||||
15/shapes = [ ]
|
||||
15/z_index = 0
|
||||
|
||||
[sub_resource type="TileSet" id=8]
|
||||
resource_local_to_scene = true
|
||||
0/name = "MiscTreasure.png 0"
|
||||
0/texture = ExtResource( 3 )
|
||||
0/tex_offset = Vector2( 0, -20 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 0, 20, 40 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
1/name = "MiscTreasure.png 1"
|
||||
1/texture = ExtResource( 3 )
|
||||
1/tex_offset = Vector2( 0, -20 )
|
||||
1/modulate = Color( 1, 1, 1, 1 )
|
||||
1/region = Rect2( 20, 0, 20, 40 )
|
||||
1/tile_mode = 0
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
1/shape_one_way = false
|
||||
1/shape_one_way_margin = 0.0
|
||||
1/shapes = [ ]
|
||||
1/z_index = 0
|
||||
2/name = "MiscTreasure.png 2"
|
||||
2/texture = ExtResource( 3 )
|
||||
2/tex_offset = Vector2( 0, -20 )
|
||||
2/modulate = Color( 1, 1, 1, 1 )
|
||||
2/region = Rect2( 40, 0, 20, 40 )
|
||||
2/tile_mode = 0
|
||||
2/occluder_offset = Vector2( 0, 0 )
|
||||
2/navigation_offset = Vector2( 0, 0 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
2/shape_one_way = false
|
||||
2/shape_one_way_margin = 0.0
|
||||
2/shapes = [ ]
|
||||
2/z_index = 0
|
||||
3/name = "MiscTreasure.png 3"
|
||||
3/texture = ExtResource( 3 )
|
||||
3/tex_offset = Vector2( 0, -20 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 60, 0, 20, 40 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "MiscTreasure.png 4"
|
||||
4/texture = ExtResource( 3 )
|
||||
4/tex_offset = Vector2( 0, -20 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 80, 0, 20, 40 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "MiscTreasure.png 5"
|
||||
5/texture = ExtResource( 3 )
|
||||
5/tex_offset = Vector2( 0, -20 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 100, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "MiscTreasure.png 6"
|
||||
6/texture = ExtResource( 3 )
|
||||
6/tex_offset = Vector2( 0, -20 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 120, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "MiscTreasure.png 7"
|
||||
7/texture = ExtResource( 3 )
|
||||
7/tex_offset = Vector2( 0, -20 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 140, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "MiscTreasure.png 8"
|
||||
8/texture = ExtResource( 3 )
|
||||
8/tex_offset = Vector2( 0, -20 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 160, 0, 20, 40 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "MiscTreasure.png 9"
|
||||
9/texture = ExtResource( 3 )
|
||||
9/tex_offset = Vector2( 0, -20 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 180, 0, 20, 40 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "MiscTreasure.png 10"
|
||||
10/texture = ExtResource( 3 )
|
||||
10/tex_offset = Vector2( 0, -20 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 200, 0, 20, 40 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
|
||||
[node name="Level3" type="Navigation2D"]
|
||||
|
||||
[node name="Dungeon" parent="." instance=ExtResource( 8 )]
|
||||
tile_data = PoolIntArray( 65536, 13, 0, 65537, 6, 0, 65538, 6, 0, 65539, 6, 0, 65540, 4, 0, 65541, 4, 0, 65542, 4, 0, 65543, 4, 0, 65544, 4, 0, 65545, 6, 0, 65546, 6, 0, 65547, 6, 0, 65548, 0, 0, 65549, 0, 0, 65550, 6, 0, 65551, 5, 0, 65552, 8, 0, 131072, 13, 0, 131073, 0, 0, 131074, 2, 0, 131075, 0, 0, 131076, 0, 0, 131077, 2, 0, 131078, 0, 0, 131079, 2, 0, 131080, 0, 0, 131081, 0, 0, 131082, 0, 0, 131083, 2, 0, 131084, 0, 0, 131085, 0, 0, 131086, 2, 0, 131087, 0, 0, 131088, 8, 0, 196608, 13, 0, 196609, 1, 0, 196610, 6, 0, 196611, 7, 0, 196612, 1, 0, 196613, 18, 0, 196614, 0, 0, 196615, 5, 0, 196616, 21, 0, 196617, 5, 0, 196618, 1, 0, 196619, 18, 0, 196620, 0, 0, 196621, 6, 0, 196622, 7, 0, 196623, 0, 0, 196624, 8, 0, 262144, 13, 0, 262145, 0, 0, 262146, 0, 0, 262147, 2, 0, 262148, 0, 0, 262149, 19, 0, 262150, 0, 0, 262151, 21, 0, 262152, 0, 0, 262153, 21, 0, 262154, 0, 0, 262155, 19, 0, 262156, 0, 0, 262157, 2, 0, 262158, 0, 0, 262159, 0, 0, 262160, 8, 0, 393215, 6, 0, 327680, 4, 0, 327681, 7, 0, 327682, 1, 0, 327683, 5, 0, 327684, 1, 0, 327685, 20, 0, 327686, 0, 0, 327687, 23, 0, 327688, 23, 0, 327689, 23, 0, 327690, 0, 0, 327691, 20, 0, 327692, 1, 0, 327693, 5, 0, 327694, 0, 0, 327695, 5, 0, 327696, 4, 0, 327697, 6, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 21, 0, 393219, 2, 0, 393220, 0, 0, 393221, 2, 0, 393222, 0, 0, 393224, 0, 0, 393226, 0, 0, 393227, 2, 0, 393228, 0, 0, 393229, 2, 0, 393230, 21, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 524287, 6, 0, 458752, 17, 0, 458753, 7, 0, 458754, 0, 0, 458755, 5, 0, 458756, 0, 0, 458757, 18, 0, 458758, 0, 0, 458760, 23, 0, 458762, 0, 0, 458763, 18, 0, 458764, 0, 0, 458765, 5, 0, 458766, 0, 0, 458767, 6, 0, 458768, 12, 0, 458769, 6, 0, 524288, 13, 0, 524289, 0, 0, 524290, 0, 0, 524291, 2, 0, 524292, 0, 0, 524293, 19, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 19, 0, 524300, 0, 0, 524301, 2, 0, 524302, 0, 0, 524303, 0, 0, 524304, 8, 0, 589824, 13, 0, 589825, 1, 0, 589826, 6, 0, 589827, 7, 0, 589828, 1, 0, 589829, 20, 0, 589830, 0, 0, 589831, 5, 0, 589832, 0, 0, 589833, 5, 0, 589834, 0, 0, 589835, 20, 0, 589836, 0, 0, 589837, 6, 0, 589838, 7, 0, 589839, 1, 0, 589840, 8, 0, 655360, 13, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 2, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 2, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 8, 0, 720896, 15, 0, 720897, 6, 0, 720898, 4, 0, 720899, 4, 0, 720900, 4, 0, 720901, 4, 0, 720902, 4, 0, 720903, 0, 0, 720904, 0, 0, 720905, 4, 0, 720906, 4, 0, 720907, 4, 0, 720908, 4, 0, 720909, 4, 0, 720910, 4, 0, 720911, 6, 0, 720912, 10, 0, 786440, 3, 0 )
|
||||
|
||||
[node name="Treasure" parent="." instance=ExtResource( 5 )]
|
||||
tile_data = PoolIntArray( 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 196609, 0, 0, 196612, 0, 0, 196614, 0, 0, 196618, 0, 0, 196620, 0, 0, 196623, 0, 0, 262145, 0, 0, 262146, 0, 0, 262147, 0, 0, 262148, 0, 0, 262150, 0, 0, 262152, 1, 0, 262154, 0, 0, 262156, 0, 0, 262157, 0, 0, 262158, 0, 0, 262159, 2, 0, 327682, 0, 0, 327684, 0, 0, 327686, 0, 0, 327690, 0, 0, 327692, 0, 0, 327694, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 0, 0, 393226, 0, 0, 393227, 0, 0, 393228, 0, 0, 393229, 0, 0, 458754, 0, 0, 458756, 0, 0, 458758, 0, 0, 458762, 0, 0, 458764, 0, 0, 458766, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 589825, 0, 0, 589828, 0, 0, 589830, 0, 0, 589832, 0, 0, 589834, 0, 0, 589836, 0, 0, 589839, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0 )
|
||||
|
||||
[node name="Overlay" parent="." instance=ExtResource( 31 )]
|
||||
z_index = 3
|
||||
tile_set = SubResource( 7 )
|
||||
tile_data = PoolIntArray( 65540, 12, 0, 65546, 9, 0, 65550, 9, 0, 196609, 0, 0, 196610, 6, 0, 196612, 0, 0, 196620, 0, 0, 196622, 6, 0, 327692, 0, 0, 393224, 7, 0, 589826, 6, 0, 589828, 0, 0, 589836, 0, 0, 589838, 6, 0 )
|
||||
|
||||
[node name="Markers" type="TileMap" parent="."]
|
||||
z_index = 5
|
||||
tile_set = ExtResource( 12 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 196609, 5, 0, 196612, 1, 0, 196616, 3, 0, 196620, 4, 0, 262151, 0, 0, 262153, 0, 0, 327692, 5, 0, 458751, 10, 0, 393218, 2, 0, 393230, 2, 0, 393233, 9, 0, 589828, 4, 0, 589836, 1, 0, 655368, 8, 0 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Foreground" parent="." instance=ExtResource( 14 )]
|
||||
tile_data = PoolIntArray( 131074, 1, 0, 131086, 1, 0, 327688, 0, 0, 524290, 1, 0, 524302, 1, 0 )
|
||||
|
||||
[node name="DoorBack" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65547, 3, 0, 720903, 3, 0 )
|
||||
script = ExtResource( 17 )
|
||||
|
||||
[node name="DoorFore" type="TileMap" parent="."]
|
||||
z_index = 10
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 11, 2, 0, 655367, 2, 0 )
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 6 )]
|
||||
position = Vector2( 170, 240 )
|
||||
z_index = 7
|
||||
script = ExtResource( 20 )
|
||||
|
||||
[node name="EnemyAI" type="Node2D" parent="."]
|
||||
position = Vector2( -1, 0 )
|
||||
script = ExtResource( 21 )
|
||||
|
||||
[node name="EnemyFiend" parent="EnemyAI" instance=ExtResource( 7 )]
|
||||
position = Vector2( 30, 53 )
|
||||
z_index = 8
|
||||
script = ExtResource( 23 )
|
||||
|
||||
[node name="EnemyLizardMan" parent="EnemyAI" instance=ExtResource( 19 )]
|
||||
position = Vector2( 330, 128 )
|
||||
z_index = 8
|
||||
script = ExtResource( 22 )
|
||||
|
||||
[node name="EnemyOgre" parent="EnemyAI" instance=ExtResource( 18 )]
|
||||
position = Vector2( 9, 132 )
|
||||
z_index = 8
|
||||
script = ExtResource( 24 )
|
||||
|
||||
[node name="EnemySlime" parent="EnemyAI" instance=ExtResource( 16 )]
|
||||
position = Vector2( 309, 52 )
|
||||
z_index = 8
|
||||
script = ExtResource( 25 )
|
||||
|
||||
[node name="MapGenerated" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
[node name="WallBlades" parent="MapGenerated" index="0"]
|
||||
z_index = 2
|
||||
z_as_relative = false
|
||||
|
||||
[node name="MagicWalls" parent="MapGenerated" index="2"]
|
||||
z_index = 5
|
||||
|
||||
[node name="MiscTreasure" parent="MapGenerated" index="3"]
|
||||
tile_set = SubResource( 8 )
|
||||
|
||||
[editable path="MapGenerated"]
|
||||
527
levels/Level_4.tscn
Normal file
|
|
@ -0,0 +1,527 @@
|
|||
[gd_scene load_steps=40 format=2]
|
||||
|
||||
[ext_resource path="res://world/map_generated/MapGenerated.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://world/markers/Markers.gd" type="Script" id=2]
|
||||
[ext_resource path="res://world/overlay/treasure/misc_treasure/MiscTreasure.png" type="Texture" id=3]
|
||||
[ext_resource path="res://world/door/DoorFore.gd" type="Script" id=4]
|
||||
[ext_resource path="res://world/overlay/treasure/Treasure.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://world/dungeon/Dungeon.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_1.png" type="Texture" id=9]
|
||||
[ext_resource path="res://world/door/Doors.tres" type="TileSet" id=10]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_3.png" type="Texture" id=11]
|
||||
[ext_resource path="res://world/markers/Markers.tres" type="TileSet" id=12]
|
||||
[ext_resource path="res://world/foreground/Foreground.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://world/door/DoorBack.gd" type="Script" id=17]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.tscn" type="PackedScene" id=19]
|
||||
[ext_resource path="res://player/Player.gd" type="Script" id=20]
|
||||
[ext_resource path="res://enemy/ai/EnemyAI.gd" type="Script" id=21]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.gd" type="Script" id=22]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.gd" type="Script" id=23]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.gd" type="Script" id=24]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.gd" type="Script" id=25]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_4.png" type="Texture" id=26]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_0.png" type="Texture" id=27]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_5.png" type="Texture" id=28]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_2.png" type="Texture" id=29]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainWater.tres" type="Texture" id=30]
|
||||
[ext_resource path="res://world/overlay/Overlay.tscn" type="PackedScene" id=31]
|
||||
[ext_resource path="res://world/overlay/Overlay.png" type="Texture" id=32]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainBlood.tres" type="Texture" id=33]
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=1]
|
||||
flags = 4
|
||||
frames = 10
|
||||
frame_0/texture = ExtResource( 27 )
|
||||
frame_0/delay_sec = 6.5
|
||||
frame_1/texture = ExtResource( 9 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = ExtResource( 29 )
|
||||
frame_2/delay_sec = 0.0
|
||||
frame_3/texture = ExtResource( 11 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = ExtResource( 26 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/texture = ExtResource( 28 )
|
||||
frame_5/delay_sec = 2.0
|
||||
frame_6/texture = ExtResource( 26 )
|
||||
frame_6/delay_sec = 0.0
|
||||
frame_7/texture = ExtResource( 11 )
|
||||
frame_7/delay_sec = 0.0
|
||||
frame_8/texture = ExtResource( 29 )
|
||||
frame_8/delay_sec = 0.0
|
||||
frame_9/texture = ExtResource( 9 )
|
||||
frame_9/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=2]
|
||||
flags = 4
|
||||
|
||||
[sub_resource type="StreamTexture" id=3]
|
||||
flags = 4
|
||||
|
||||
[sub_resource type="StreamTexture" id=4]
|
||||
flags = 4
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=5]
|
||||
flags = 4
|
||||
frames = 6
|
||||
frame_0/texture = SubResource( 2 )
|
||||
frame_0/delay_sec = 5.0
|
||||
frame_1/texture = SubResource( 3 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = SubResource( 4 )
|
||||
frame_2/delay_sec = 1.0
|
||||
frame_3/texture = SubResource( 3 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = SubResource( 2 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=6]
|
||||
flags = 4
|
||||
|
||||
[sub_resource type="TileSet" id=7]
|
||||
resource_local_to_scene = true
|
||||
0/name = "AnimatedBarSide.tres 0"
|
||||
0/texture = SubResource( 1 )
|
||||
0/tex_offset = Vector2( 0, 0 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 1, 21, 20 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
3/name = "AnimatedTreasure.tres 3"
|
||||
3/texture = SubResource( 5 )
|
||||
3/tex_offset = Vector2( 0, 0 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 0, 0, 20, 20 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "treasure_potion.png 4"
|
||||
4/texture = SubResource( 6 )
|
||||
4/tex_offset = Vector2( 0, 0 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 0, 0, 20, 20 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "FountainWater.tres 5"
|
||||
5/texture = ExtResource( 30 )
|
||||
5/tex_offset = Vector2( 0, 0 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 0, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "Overlay.png 6"
|
||||
6/texture = ExtResource( 32 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 0, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "FountainBlood.tres 7"
|
||||
7/texture = ExtResource( 33 )
|
||||
7/tex_offset = Vector2( 0, 0 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 0, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "Overlay.png 8"
|
||||
8/texture = ExtResource( 32 )
|
||||
8/tex_offset = Vector2( 0, 0 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 20, 0, 20, 20 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "Overlay.png 9"
|
||||
9/texture = ExtResource( 32 )
|
||||
9/tex_offset = Vector2( 0, 0 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 40, 0, 20, 20 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "Overlay.png 10"
|
||||
10/texture = ExtResource( 32 )
|
||||
10/tex_offset = Vector2( 0, 0 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 60, 0, 20, 20 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
11/name = "Overlay.png 11"
|
||||
11/texture = ExtResource( 32 )
|
||||
11/tex_offset = Vector2( 0, 0 )
|
||||
11/modulate = Color( 1, 1, 1, 1 )
|
||||
11/region = Rect2( 80, 0, 20, 20 )
|
||||
11/tile_mode = 0
|
||||
11/occluder_offset = Vector2( 0, 0 )
|
||||
11/navigation_offset = Vector2( 0, 0 )
|
||||
11/shape_offset = Vector2( 0, 0 )
|
||||
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
11/shape_one_way = false
|
||||
11/shape_one_way_margin = 0.0
|
||||
11/shapes = [ ]
|
||||
11/z_index = 0
|
||||
12/name = "Overlay.png 12"
|
||||
12/texture = ExtResource( 32 )
|
||||
12/tex_offset = Vector2( 0, 0 )
|
||||
12/modulate = Color( 1, 1, 1, 1 )
|
||||
12/region = Rect2( 20, 20, 20, 20 )
|
||||
12/tile_mode = 0
|
||||
12/occluder_offset = Vector2( 0, 0 )
|
||||
12/navigation_offset = Vector2( 0, 0 )
|
||||
12/shape_offset = Vector2( 0, 0 )
|
||||
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
12/shape_one_way = false
|
||||
12/shape_one_way_margin = 0.0
|
||||
12/shapes = [ ]
|
||||
12/z_index = 0
|
||||
13/name = "Overlay.png 13"
|
||||
13/texture = ExtResource( 32 )
|
||||
13/tex_offset = Vector2( 0, 0 )
|
||||
13/modulate = Color( 1, 1, 1, 1 )
|
||||
13/region = Rect2( 40, 20, 20, 20 )
|
||||
13/tile_mode = 0
|
||||
13/occluder_offset = Vector2( 0, 0 )
|
||||
13/navigation_offset = Vector2( 0, 0 )
|
||||
13/shape_offset = Vector2( 0, 0 )
|
||||
13/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
13/shape_one_way = false
|
||||
13/shape_one_way_margin = 0.0
|
||||
13/shapes = [ ]
|
||||
13/z_index = 0
|
||||
14/name = "Overlay.png 14"
|
||||
14/texture = ExtResource( 32 )
|
||||
14/tex_offset = Vector2( 0, 0 )
|
||||
14/modulate = Color( 1, 1, 1, 1 )
|
||||
14/region = Rect2( 60, 20, 20, 20 )
|
||||
14/tile_mode = 0
|
||||
14/occluder_offset = Vector2( 0, 0 )
|
||||
14/navigation_offset = Vector2( 0, 0 )
|
||||
14/shape_offset = Vector2( 0, 0 )
|
||||
14/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
14/shape_one_way = false
|
||||
14/shape_one_way_margin = 0.0
|
||||
14/shapes = [ ]
|
||||
14/z_index = 0
|
||||
15/name = "Overlay.png 15"
|
||||
15/texture = ExtResource( 32 )
|
||||
15/tex_offset = Vector2( 0, 0 )
|
||||
15/modulate = Color( 1, 1, 1, 1 )
|
||||
15/region = Rect2( 60, 40, 20, 20 )
|
||||
15/tile_mode = 0
|
||||
15/occluder_offset = Vector2( 0, 0 )
|
||||
15/navigation_offset = Vector2( 0, 0 )
|
||||
15/shape_offset = Vector2( 0, 0 )
|
||||
15/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
15/shape_one_way = false
|
||||
15/shape_one_way_margin = 0.0
|
||||
15/shapes = [ ]
|
||||
15/z_index = 0
|
||||
|
||||
[sub_resource type="TileSet" id=8]
|
||||
resource_local_to_scene = true
|
||||
0/name = "MiscTreasure.png 0"
|
||||
0/texture = ExtResource( 3 )
|
||||
0/tex_offset = Vector2( 0, -20 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 0, 20, 40 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
1/name = "MiscTreasure.png 1"
|
||||
1/texture = ExtResource( 3 )
|
||||
1/tex_offset = Vector2( 0, -20 )
|
||||
1/modulate = Color( 1, 1, 1, 1 )
|
||||
1/region = Rect2( 20, 0, 20, 40 )
|
||||
1/tile_mode = 0
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
1/shape_one_way = false
|
||||
1/shape_one_way_margin = 0.0
|
||||
1/shapes = [ ]
|
||||
1/z_index = 0
|
||||
2/name = "MiscTreasure.png 2"
|
||||
2/texture = ExtResource( 3 )
|
||||
2/tex_offset = Vector2( 0, -20 )
|
||||
2/modulate = Color( 1, 1, 1, 1 )
|
||||
2/region = Rect2( 40, 0, 20, 40 )
|
||||
2/tile_mode = 0
|
||||
2/occluder_offset = Vector2( 0, 0 )
|
||||
2/navigation_offset = Vector2( 0, 0 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
2/shape_one_way = false
|
||||
2/shape_one_way_margin = 0.0
|
||||
2/shapes = [ ]
|
||||
2/z_index = 0
|
||||
3/name = "MiscTreasure.png 3"
|
||||
3/texture = ExtResource( 3 )
|
||||
3/tex_offset = Vector2( 0, -20 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 60, 0, 20, 40 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "MiscTreasure.png 4"
|
||||
4/texture = ExtResource( 3 )
|
||||
4/tex_offset = Vector2( 0, -20 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 80, 0, 20, 40 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "MiscTreasure.png 5"
|
||||
5/texture = ExtResource( 3 )
|
||||
5/tex_offset = Vector2( 0, -20 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 100, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "MiscTreasure.png 6"
|
||||
6/texture = ExtResource( 3 )
|
||||
6/tex_offset = Vector2( 0, -20 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 120, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "MiscTreasure.png 7"
|
||||
7/texture = ExtResource( 3 )
|
||||
7/tex_offset = Vector2( 0, -20 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 140, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "MiscTreasure.png 8"
|
||||
8/texture = ExtResource( 3 )
|
||||
8/tex_offset = Vector2( 0, -20 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 160, 0, 20, 40 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "MiscTreasure.png 9"
|
||||
9/texture = ExtResource( 3 )
|
||||
9/tex_offset = Vector2( 0, -20 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 180, 0, 20, 40 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "MiscTreasure.png 10"
|
||||
10/texture = ExtResource( 3 )
|
||||
10/tex_offset = Vector2( 0, -20 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 200, 0, 20, 40 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
|
||||
[node name="LevelJonah" type="Navigation2D"]
|
||||
|
||||
[node name="Dungeon" parent="." instance=ExtResource( 8 )]
|
||||
tile_data = PoolIntArray( 65544, 24, 0, 65545, 6, 0, 65546, 15, 0, 65547, 0, 0, 65548, 0, 0, 65549, 7, 0, 65550, 25, 0, 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 2, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 23, 0, 131083, 0, 0, 131084, 23, 0, 131085, 0, 0, 131086, 2, 0, 131087, 0, 0, 196609, 1, 0, 196610, 18, 0, 196611, 21, 0, 196612, 5, 0, 196613, 0, 0, 196614, 18, 0, 196615, 0, 0, 196616, 18, 0, 196617, 0, 0, 196618, 0, 0, 196619, 0, 0, 196620, 0, 0, 196621, 0, 0, 196622, 18, 0, 196623, 0, 0, 262144, 17, 0, 262145, 0, 0, 262146, 20, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 20, 0, 262151, 0, 0, 262152, 20, 0, 262153, 7, 0, 262154, 0, 0, 262155, 5, 0, 262156, 0, 0, 262157, 6, 0, 262158, 20, 0, 262159, 0, 0, 262160, 12, 0, 393215, 6, 0, 327680, 7, 0, 327681, 0, 0, 327682, 0, 0, 327683, 0, 0, 327684, 5, 0, 327685, 21, 0, 327686, 0, 0, 327687, 21, 0, 327688, 0, 0, 327689, 0, 0, 327690, 21, 0, 327691, 0, 0, 327692, 0, 0, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 327696, 6, 0, 327697, 6, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 18, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 5, 0, 393223, 0, 0, 393224, 6, 0, 393225, 7, 0, 393226, 0, 0, 393227, 5, 0, 393228, 18, 0, 393229, 21, 0, 393230, 18, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 524287, 6, 0, 458752, 17, 0, 458753, 0, 0, 458754, 20, 0, 458755, 21, 0, 458756, 5, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, 20, 0, 458765, 0, 0, 458766, 20, 0, 458767, 0, 0, 458768, 12, 0, 458769, 6, 0, 524288, 5, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 18, 0, 524295, 0, 0, 524296, 18, 0, 524297, 0, 0, 524298, 18, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 5, 0, 589824, 26, 0, 589825, 1, 0, 589826, 6, 0, 589827, 7, 0, 589828, 0, 0, 589829, 6, 0, 589830, 20, 0, 589831, 0, 0, 589832, 20, 0, 589833, 0, 0, 589834, 20, 0, 589835, 7, 0, 589836, 21, 0, 589837, 6, 0, 589838, 7, 0, 589839, 0, 0, 589840, 26, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 2, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 720897, 23, 0, 720898, 23, 0, 720899, 23, 0, 720900, 23, 0, 720901, 23, 0, 720902, 30, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 31, 0, 720907, 23, 0, 720908, 23, 0, 720909, 23, 0, 720910, 23, 0, 720911, 23, 0, 786440, 3, 0 )
|
||||
|
||||
[node name="Treasure" parent="." instance=ExtResource( 5 )]
|
||||
tile_data = PoolIntArray( 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 196609, 0, 0, 196613, 0, 0, 196615, 0, 0, 196617, 0, 0, 196618, 0, 0, 196619, 0, 0, 196620, 0, 0, 196621, 0, 0, 196623, 0, 0, 262145, 0, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262151, 0, 0, 262154, 0, 0, 262156, 0, 0, 262159, 0, 0, 327681, 0, 0, 327682, 0, 0, 327683, 0, 0, 327686, 1, 0, 327688, 0, 0, 327689, 0, 0, 327691, 0, 0, 327692, 0, 0, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 393217, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393223, 0, 0, 393226, 0, 0, 393231, 0, 0, 458753, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458765, 2, 0, 458767, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524295, 0, 0, 524297, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 589825, 0, 0, 589828, 0, 0, 589831, 0, 0, 589833, 0, 0, 589839, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0 )
|
||||
|
||||
[node name="Overlay" parent="." instance=ExtResource( 31 )]
|
||||
z_index = 3
|
||||
tile_set = SubResource( 7 )
|
||||
tile_data = PoolIntArray( 65544, 6, 0, 65550, 6, 0, 393224, 13, 0, 458764, 10, 0, 458766, 10, 0, 524288, 6, 0, 524304, 6, 0, 720902, 6, 0, 720906, 6, 0 )
|
||||
|
||||
[node name="Markers" type="TileMap" parent="."]
|
||||
z_index = 5
|
||||
tile_set = ExtResource( 12 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 196611, 1, 0, 327685, 0, 0, 327687, 0, 0, 327690, 5, 0, 458751, 10, 0, 393216, 1, 0, 393229, 3, 0, 393233, 9, 0, 458755, 3, 0, 589836, 1, 0, 655368, 8, 0 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Foreground" parent="." instance=ExtResource( 14 )]
|
||||
tile_data = PoolIntArray( 8, 1, 0, 14, 1, 0, 196608, 1, 0, 196624, 1, 0, 458752, 1, 0, 458768, 1, 0, 655366, 1, 0, 655370, 1, 0 )
|
||||
|
||||
[node name="DoorBack" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65546, 3, 0, 720903, 3, 0 )
|
||||
script = ExtResource( 17 )
|
||||
|
||||
[node name="DoorFore" type="TileMap" parent="."]
|
||||
z_index = 10
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 10, 2, 0, 655367, 2, 0 )
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 6 )]
|
||||
position = Vector2( 170, 240 )
|
||||
z_index = 7
|
||||
script = ExtResource( 20 )
|
||||
|
||||
[node name="EnemyAI" type="Node2D" parent="."]
|
||||
position = Vector2( -1, 0 )
|
||||
script = ExtResource( 21 )
|
||||
|
||||
[node name="EnemyFiend" parent="EnemyAI" instance=ExtResource( 7 )]
|
||||
position = Vector2( 30, 53 )
|
||||
z_index = 8
|
||||
script = ExtResource( 23 )
|
||||
|
||||
[node name="EnemyLizardMan" parent="EnemyAI" instance=ExtResource( 19 )]
|
||||
position = Vector2( 330, 128 )
|
||||
z_index = 8
|
||||
script = ExtResource( 22 )
|
||||
|
||||
[node name="EnemyOgre" parent="EnemyAI" instance=ExtResource( 18 )]
|
||||
position = Vector2( 9, 132 )
|
||||
z_index = 8
|
||||
script = ExtResource( 24 )
|
||||
|
||||
[node name="EnemySlime" parent="EnemyAI" instance=ExtResource( 16 )]
|
||||
position = Vector2( 309, 52 )
|
||||
z_index = 8
|
||||
script = ExtResource( 25 )
|
||||
|
||||
[node name="MapGenerated" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
[node name="WallBlades" parent="MapGenerated" index="0"]
|
||||
z_index = 2
|
||||
z_as_relative = false
|
||||
|
||||
[node name="MagicWalls" parent="MapGenerated" index="2"]
|
||||
z_index = 5
|
||||
|
||||
[node name="MiscTreasure" parent="MapGenerated" index="3"]
|
||||
tile_set = SubResource( 8 )
|
||||
|
||||
[editable path="MapGenerated"]
|
||||
531
levels/Level_5.tscn
Normal file
|
|
@ -0,0 +1,531 @@
|
|||
[gd_scene load_steps=40 format=2]
|
||||
|
||||
[ext_resource path="res://world/map_generated/MapGenerated.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://world/markers/Markers.gd" type="Script" id=2]
|
||||
[ext_resource path="res://world/overlay/treasure/misc_treasure/MiscTreasure.png" type="Texture" id=3]
|
||||
[ext_resource path="res://world/door/DoorFore.gd" type="Script" id=4]
|
||||
[ext_resource path="res://world/overlay/treasure/Treasure.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://world/dungeon/Dungeon.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_1.png" type="Texture" id=9]
|
||||
[ext_resource path="res://world/door/Doors.tres" type="TileSet" id=10]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_2.png" type="Texture" id=11]
|
||||
[ext_resource path="res://world/markers/Markers.tres" type="TileSet" id=12]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_4.png" type="Texture" id=13]
|
||||
[ext_resource path="res://world/foreground/Foreground.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_5.png" type="Texture" id=15]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://world/door/DoorBack.gd" type="Script" id=17]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.tscn" type="PackedScene" id=19]
|
||||
[ext_resource path="res://player/Player.gd" type="Script" id=20]
|
||||
[ext_resource path="res://enemy/ai/EnemyAI.gd" type="Script" id=21]
|
||||
[ext_resource path="res://enemy/enemylizardman/EnemyLizardMan.gd" type="Script" id=22]
|
||||
[ext_resource path="res://enemy/enemyfiend/EnemyFiend.gd" type="Script" id=23]
|
||||
[ext_resource path="res://enemy/enemyogre/EnemyOgre.gd" type="Script" id=24]
|
||||
[ext_resource path="res://enemy/enemyslime/EnemySlime.gd" type="Script" id=25]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_0.png" type="Texture" id=26]
|
||||
[ext_resource path="res://world/map_generated/wallblades/WallBlades_3.png" type="Texture" id=27]
|
||||
[ext_resource path="res://world/overlay/Overlay.png" type="Texture" id=28]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainBlood.tres" type="Texture" id=29]
|
||||
[ext_resource path="res://world/overlay/fountain/FountainWater.tres" type="Texture" id=30]
|
||||
[ext_resource path="res://world/overlay/Overlay.tscn" type="PackedScene" id=31]
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=1]
|
||||
flags = 4
|
||||
frames = 10
|
||||
frame_0/texture = ExtResource( 26 )
|
||||
frame_0/delay_sec = 6.5
|
||||
frame_1/texture = ExtResource( 9 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = ExtResource( 11 )
|
||||
frame_2/delay_sec = 0.0
|
||||
frame_3/texture = ExtResource( 27 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = ExtResource( 13 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/texture = ExtResource( 15 )
|
||||
frame_5/delay_sec = 2.0
|
||||
frame_6/texture = ExtResource( 13 )
|
||||
frame_6/delay_sec = 0.0
|
||||
frame_7/texture = ExtResource( 27 )
|
||||
frame_7/delay_sec = 0.0
|
||||
frame_8/texture = ExtResource( 11 )
|
||||
frame_8/delay_sec = 0.0
|
||||
frame_9/texture = ExtResource( 9 )
|
||||
frame_9/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=2]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_chest_0.png-560c18dda9040ff612e2ebe66a02172d.stex"
|
||||
|
||||
[sub_resource type="StreamTexture" id=3]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_chest_1.png-4aeb901bba998385d767e010b998fd4b.stex"
|
||||
|
||||
[sub_resource type="StreamTexture" id=4]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_chest_2.png-9622e2c8b849f51151f631e9f506139f.stex"
|
||||
|
||||
[sub_resource type="AnimatedTexture" id=5]
|
||||
frames = 6
|
||||
frame_0/texture = SubResource( 2 )
|
||||
frame_0/delay_sec = 5.0
|
||||
frame_1/texture = SubResource( 3 )
|
||||
frame_1/delay_sec = 0.0
|
||||
frame_2/texture = SubResource( 4 )
|
||||
frame_2/delay_sec = 1.0
|
||||
frame_3/texture = SubResource( 3 )
|
||||
frame_3/delay_sec = 0.0
|
||||
frame_4/texture = SubResource( 2 )
|
||||
frame_4/delay_sec = 0.0
|
||||
frame_5/delay_sec = 0.0
|
||||
|
||||
[sub_resource type="StreamTexture" id=6]
|
||||
flags = 4
|
||||
load_path = "res://.import/treasure_potion.png-8f25edf6af9a8dcf25e331018982ecc0.stex"
|
||||
|
||||
[sub_resource type="TileSet" id=7]
|
||||
resource_local_to_scene = true
|
||||
0/name = "AnimatedBarSide.tres 0"
|
||||
0/texture = SubResource( 1 )
|
||||
0/tex_offset = Vector2( 0, 0 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 1, 21, 20 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
3/name = "AnimatedTreasure.tres 3"
|
||||
3/texture = SubResource( 5 )
|
||||
3/tex_offset = Vector2( 0, 0 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 0, 0, 20, 20 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "treasure_potion.png 4"
|
||||
4/texture = SubResource( 6 )
|
||||
4/tex_offset = Vector2( 0, 0 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 0, 0, 20, 20 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "FountainWater.tres 5"
|
||||
5/texture = ExtResource( 30 )
|
||||
5/tex_offset = Vector2( 0, 0 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 0, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "Overlay.png 6"
|
||||
6/texture = ExtResource( 28 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 0, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "FountainBlood.tres 7"
|
||||
7/texture = ExtResource( 29 )
|
||||
7/tex_offset = Vector2( 0, 0 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 0, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "Overlay.png 8"
|
||||
8/texture = ExtResource( 28 )
|
||||
8/tex_offset = Vector2( 0, 0 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 20, 0, 20, 20 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "Overlay.png 9"
|
||||
9/texture = ExtResource( 28 )
|
||||
9/tex_offset = Vector2( 0, 0 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 40, 0, 20, 20 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "Overlay.png 10"
|
||||
10/texture = ExtResource( 28 )
|
||||
10/tex_offset = Vector2( 0, 0 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 60, 0, 20, 20 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
11/name = "Overlay.png 11"
|
||||
11/texture = ExtResource( 28 )
|
||||
11/tex_offset = Vector2( 0, 0 )
|
||||
11/modulate = Color( 1, 1, 1, 1 )
|
||||
11/region = Rect2( 80, 0, 20, 20 )
|
||||
11/tile_mode = 0
|
||||
11/occluder_offset = Vector2( 0, 0 )
|
||||
11/navigation_offset = Vector2( 0, 0 )
|
||||
11/shape_offset = Vector2( 0, 0 )
|
||||
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
11/shape_one_way = false
|
||||
11/shape_one_way_margin = 0.0
|
||||
11/shapes = [ ]
|
||||
11/z_index = 0
|
||||
12/name = "Overlay.png 12"
|
||||
12/texture = ExtResource( 28 )
|
||||
12/tex_offset = Vector2( 0, 0 )
|
||||
12/modulate = Color( 1, 1, 1, 1 )
|
||||
12/region = Rect2( 20, 20, 20, 20 )
|
||||
12/tile_mode = 0
|
||||
12/occluder_offset = Vector2( 0, 0 )
|
||||
12/navigation_offset = Vector2( 0, 0 )
|
||||
12/shape_offset = Vector2( 0, 0 )
|
||||
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
12/shape_one_way = false
|
||||
12/shape_one_way_margin = 0.0
|
||||
12/shapes = [ ]
|
||||
12/z_index = 0
|
||||
13/name = "Overlay.png 13"
|
||||
13/texture = ExtResource( 28 )
|
||||
13/tex_offset = Vector2( 0, 0 )
|
||||
13/modulate = Color( 1, 1, 1, 1 )
|
||||
13/region = Rect2( 40, 20, 20, 20 )
|
||||
13/tile_mode = 0
|
||||
13/occluder_offset = Vector2( 0, 0 )
|
||||
13/navigation_offset = Vector2( 0, 0 )
|
||||
13/shape_offset = Vector2( 0, 0 )
|
||||
13/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
13/shape_one_way = false
|
||||
13/shape_one_way_margin = 0.0
|
||||
13/shapes = [ ]
|
||||
13/z_index = 0
|
||||
14/name = "Overlay.png 14"
|
||||
14/texture = ExtResource( 28 )
|
||||
14/tex_offset = Vector2( 0, 0 )
|
||||
14/modulate = Color( 1, 1, 1, 1 )
|
||||
14/region = Rect2( 60, 20, 20, 20 )
|
||||
14/tile_mode = 0
|
||||
14/occluder_offset = Vector2( 0, 0 )
|
||||
14/navigation_offset = Vector2( 0, 0 )
|
||||
14/shape_offset = Vector2( 0, 0 )
|
||||
14/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
14/shape_one_way = false
|
||||
14/shape_one_way_margin = 0.0
|
||||
14/shapes = [ ]
|
||||
14/z_index = 0
|
||||
15/name = "Overlay.png 15"
|
||||
15/texture = ExtResource( 28 )
|
||||
15/tex_offset = Vector2( 0, 0 )
|
||||
15/modulate = Color( 1, 1, 1, 1 )
|
||||
15/region = Rect2( 60, 40, 20, 20 )
|
||||
15/tile_mode = 0
|
||||
15/occluder_offset = Vector2( 0, 0 )
|
||||
15/navigation_offset = Vector2( 0, 0 )
|
||||
15/shape_offset = Vector2( 0, 0 )
|
||||
15/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
15/shape_one_way = false
|
||||
15/shape_one_way_margin = 0.0
|
||||
15/shapes = [ ]
|
||||
15/z_index = 0
|
||||
|
||||
[sub_resource type="TileSet" id=8]
|
||||
resource_local_to_scene = true
|
||||
0/name = "MiscTreasure.png 0"
|
||||
0/texture = ExtResource( 3 )
|
||||
0/tex_offset = Vector2( 0, -20 )
|
||||
0/modulate = Color( 1, 1, 1, 1 )
|
||||
0/region = Rect2( 0, 0, 20, 40 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
1/name = "MiscTreasure.png 1"
|
||||
1/texture = ExtResource( 3 )
|
||||
1/tex_offset = Vector2( 0, -20 )
|
||||
1/modulate = Color( 1, 1, 1, 1 )
|
||||
1/region = Rect2( 20, 0, 20, 40 )
|
||||
1/tile_mode = 0
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
1/shape_one_way = false
|
||||
1/shape_one_way_margin = 0.0
|
||||
1/shapes = [ ]
|
||||
1/z_index = 0
|
||||
2/name = "MiscTreasure.png 2"
|
||||
2/texture = ExtResource( 3 )
|
||||
2/tex_offset = Vector2( 0, -20 )
|
||||
2/modulate = Color( 1, 1, 1, 1 )
|
||||
2/region = Rect2( 40, 0, 20, 40 )
|
||||
2/tile_mode = 0
|
||||
2/occluder_offset = Vector2( 0, 0 )
|
||||
2/navigation_offset = Vector2( 0, 0 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
2/shape_one_way = false
|
||||
2/shape_one_way_margin = 0.0
|
||||
2/shapes = [ ]
|
||||
2/z_index = 0
|
||||
3/name = "MiscTreasure.png 3"
|
||||
3/texture = ExtResource( 3 )
|
||||
3/tex_offset = Vector2( 0, -20 )
|
||||
3/modulate = Color( 1, 1, 1, 1 )
|
||||
3/region = Rect2( 60, 0, 20, 40 )
|
||||
3/tile_mode = 0
|
||||
3/occluder_offset = Vector2( 0, 0 )
|
||||
3/navigation_offset = Vector2( 0, 0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
3/shape_one_way = false
|
||||
3/shape_one_way_margin = 0.0
|
||||
3/shapes = [ ]
|
||||
3/z_index = 0
|
||||
4/name = "MiscTreasure.png 4"
|
||||
4/texture = ExtResource( 3 )
|
||||
4/tex_offset = Vector2( 0, -20 )
|
||||
4/modulate = Color( 1, 1, 1, 1 )
|
||||
4/region = Rect2( 80, 0, 20, 40 )
|
||||
4/tile_mode = 0
|
||||
4/occluder_offset = Vector2( 0, 0 )
|
||||
4/navigation_offset = Vector2( 0, 0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
4/shape_one_way = false
|
||||
4/shape_one_way_margin = 0.0
|
||||
4/shapes = [ ]
|
||||
4/z_index = 0
|
||||
5/name = "MiscTreasure.png 5"
|
||||
5/texture = ExtResource( 3 )
|
||||
5/tex_offset = Vector2( 0, -20 )
|
||||
5/modulate = Color( 1, 1, 1, 1 )
|
||||
5/region = Rect2( 100, 0, 20, 40 )
|
||||
5/tile_mode = 0
|
||||
5/occluder_offset = Vector2( 0, 0 )
|
||||
5/navigation_offset = Vector2( 0, 0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
5/shape_one_way = false
|
||||
5/shape_one_way_margin = 0.0
|
||||
5/shapes = [ ]
|
||||
5/z_index = 0
|
||||
6/name = "MiscTreasure.png 6"
|
||||
6/texture = ExtResource( 3 )
|
||||
6/tex_offset = Vector2( 0, -20 )
|
||||
6/modulate = Color( 1, 1, 1, 1 )
|
||||
6/region = Rect2( 120, 0, 20, 40 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
6/navigation_offset = Vector2( 0, 0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
6/shape_one_way = false
|
||||
6/shape_one_way_margin = 0.0
|
||||
6/shapes = [ ]
|
||||
6/z_index = 0
|
||||
7/name = "MiscTreasure.png 7"
|
||||
7/texture = ExtResource( 3 )
|
||||
7/tex_offset = Vector2( 0, -20 )
|
||||
7/modulate = Color( 1, 1, 1, 1 )
|
||||
7/region = Rect2( 140, 0, 20, 40 )
|
||||
7/tile_mode = 0
|
||||
7/occluder_offset = Vector2( 0, 0 )
|
||||
7/navigation_offset = Vector2( 0, 0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
7/shape_one_way = false
|
||||
7/shape_one_way_margin = 0.0
|
||||
7/shapes = [ ]
|
||||
7/z_index = 0
|
||||
8/name = "MiscTreasure.png 8"
|
||||
8/texture = ExtResource( 3 )
|
||||
8/tex_offset = Vector2( 0, -20 )
|
||||
8/modulate = Color( 1, 1, 1, 1 )
|
||||
8/region = Rect2( 160, 0, 20, 40 )
|
||||
8/tile_mode = 0
|
||||
8/occluder_offset = Vector2( 0, 0 )
|
||||
8/navigation_offset = Vector2( 0, 0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
8/shape_one_way = false
|
||||
8/shape_one_way_margin = 0.0
|
||||
8/shapes = [ ]
|
||||
8/z_index = 0
|
||||
9/name = "MiscTreasure.png 9"
|
||||
9/texture = ExtResource( 3 )
|
||||
9/tex_offset = Vector2( 0, -20 )
|
||||
9/modulate = Color( 1, 1, 1, 1 )
|
||||
9/region = Rect2( 180, 0, 20, 40 )
|
||||
9/tile_mode = 0
|
||||
9/occluder_offset = Vector2( 0, 0 )
|
||||
9/navigation_offset = Vector2( 0, 0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
9/shape_one_way = false
|
||||
9/shape_one_way_margin = 0.0
|
||||
9/shapes = [ ]
|
||||
9/z_index = 0
|
||||
10/name = "MiscTreasure.png 10"
|
||||
10/texture = ExtResource( 3 )
|
||||
10/tex_offset = Vector2( 0, -20 )
|
||||
10/modulate = Color( 1, 1, 1, 1 )
|
||||
10/region = Rect2( 200, 0, 20, 40 )
|
||||
10/tile_mode = 0
|
||||
10/occluder_offset = Vector2( 0, 0 )
|
||||
10/navigation_offset = Vector2( 0, 0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
10/shape_one_way = false
|
||||
10/shape_one_way_margin = 0.0
|
||||
10/shapes = [ ]
|
||||
10/z_index = 0
|
||||
|
||||
[node name="Level5" type="Navigation2D"]
|
||||
|
||||
[node name="Dungeon" parent="." instance=ExtResource( 8 )]
|
||||
tile_data = PoolIntArray( 65536, 13, 0, 65537, 6, 0, 65538, 6, 0, 65539, 6, 0, 65540, 6, 0, 65541, 0, 0, 65542, 0, 0, 65543, 6, 0, 65544, 6, 0, 65545, 6, 0, 65546, 6, 0, 65547, 4, 0, 65548, 6, 0, 65549, 6, 0, 65550, 6, 0, 65551, 5, 0, 65552, 8, 0, 131072, 13, 0, 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 2, 0, 131077, 0, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 2, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 131088, 8, 0, 196608, 13, 0, 196609, 1, 0, 196610, 18, 0, 196611, 0, 0, 196612, 5, 0, 196613, 0, 0, 196614, 5, 0, 196615, 0, 0, 196616, 6, 0, 196617, 29, 0, 196618, 7, 0, 196619, 1, 0, 196620, 18, 0, 196621, 1, 0, 196622, 18, 0, 196623, 1, 0, 196624, 8, 0, 262144, 13, 0, 262145, 0, 0, 262146, 20, 0, 262147, 0, 0, 262148, 0, 0, 262149, 21, 0, 262150, 0, 0, 262151, 21, 0, 262152, 0, 0, 262153, 20, 0, 262154, 0, 0, 262155, 0, 0, 262156, 19, 0, 262157, 0, 0, 262158, 19, 0, 262159, 0, 0, 262160, 8, 0, 393215, 6, 0, 327680, 5, 0, 327681, 0, 0, 327682, 2, 0, 327683, 0, 0, 327684, 18, 0, 327685, 7, 0, 327686, 0, 0, 327687, 5, 0, 327688, 0, 0, 327689, 2, 0, 327690, 0, 0, 327691, 6, 0, 327692, 7, 0, 327693, 0, 0, 327694, 5, 0, 327695, 0, 0, 327696, 6, 0, 327697, 6, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 5, 0, 393219, 0, 0, 393220, 19, 0, 393221, 0, 0, 393222, 21, 0, 393223, 0, 0, 393224, 0, 0, 393225, 18, 0, 393226, 0, 0, 393227, 0, 0, 393228, 0, 0, 393229, 0, 0, 393230, 0, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 524287, 6, 0, 458752, 17, 0, 458753, 0, 0, 458754, 2, 0, 458755, 0, 0, 458756, 20, 0, 458757, 0, 0, 458758, 4, 0, 458759, 4, 0, 458760, 0, 0, 458761, 19, 0, 458762, 0, 0, 458763, 23, 0, 458764, 23, 0, 458765, 0, 0, 458766, 18, 0, 458767, 1, 0, 458768, 12, 0, 458769, 6, 0, 524288, 13, 0, 524289, 1, 0, 524290, 18, 0, 524291, 0, 0, 524292, 2, 0, 524293, 0, 0, 524294, 2, 0, 524295, 0, 0, 524296, 0, 0, 524297, 20, 0, 524298, 0, 0, 524301, 0, 0, 524302, 19, 0, 524303, 0, 0, 524304, 8, 0, 589824, 13, 0, 589825, 0, 0, 589826, 6, 0, 589827, 4, 0, 589828, 7, 0, 589829, 0, 0, 589830, 6, 0, 589831, 4, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589837, 0, 0, 589838, 20, 0, 589839, 0, 0, 589840, 8, 0, 655360, 13, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 2, 0, 655365, 0, 0, 655366, 2, 0, 655367, 2, 0, 655368, 0, 0, 655369, 23, 0, 655370, 23, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 2, 0, 655375, 0, 0, 655376, 8, 0, 720896, 15, 0, 720897, 6, 0, 720898, 4, 0, 720899, 4, 0, 720900, 4, 0, 720901, 4, 0, 720902, 4, 0, 720903, 4, 0, 720904, 4, 0, 720907, 4, 0, 720908, 4, 0, 720909, 0, 0, 720910, 0, 0, 720911, 6, 0, 720912, 10, 0, 786445, 3, 0 )
|
||||
|
||||
[node name="Overlay" parent="." instance=ExtResource( 31 )]
|
||||
z_index = 3
|
||||
tile_set = SubResource( 7 )
|
||||
tile_data = PoolIntArray( 65539, 9, 0, 65543, 9, 0, 262157, 0, 0, 589829, 0, 0 )
|
||||
|
||||
[node name="Treasure" parent="." instance=ExtResource( 5 )]
|
||||
tile_data = PoolIntArray( 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 196609, 0, 0, 196611, 0, 0, 196613, 0, 0, 196615, 0, 0, 196619, 0, 0, 196621, 0, 0, 196623, 0, 0, 262145, 0, 0, 262147, 0, 0, 262148, 0, 0, 262150, 1, 0, 262152, 0, 0, 262154, 0, 0, 262155, 0, 0, 262157, 0, 0, 262159, 0, 0, 327681, 0, 0, 327682, 0, 0, 327683, 0, 0, 327688, 0, 0, 327689, 0, 0, 327690, 0, 0, 327693, 0, 0, 327695, 0, 0, 393219, 0, 0, 393221, 0, 0, 393223, 0, 0, 393224, 0, 0, 393226, 0, 0, 393227, 0, 0, 393228, 0, 0, 393229, 0, 0, 393230, 0, 0, 458753, 0, 0, 458754, 0, 0, 458755, 0, 0, 458757, 0, 0, 458760, 0, 0, 458762, 0, 0, 458765, 0, 0, 458767, 0, 0, 524289, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524298, 0, 0, 524301, 0, 0, 524303, 0, 0, 589825, 0, 0, 589829, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589837, 0, 0, 589839, 0, 0, 655361, 2, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0 )
|
||||
|
||||
[node name="Markers" type="TileMap" parent="."]
|
||||
z_index = 5
|
||||
tile_set = ExtResource( 12 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 262149, 0, 0, 262151, 0, 0, 262157, 2, 0, 458751, 10, 0, 393222, 4, 0, 393233, 9, 0, 589829, 3, 0, 655373, 8, 0 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Foreground" parent="." instance=ExtResource( 14 )]
|
||||
|
||||
[node name="DoorBack" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65540, 3, 0, 720908, 3, 0 )
|
||||
script = ExtResource( 17 )
|
||||
|
||||
[node name="DoorFore" type="TileMap" parent="."]
|
||||
z_index = 10
|
||||
tile_set = ExtResource( 10 )
|
||||
cell_size = Vector2( 20, 20 )
|
||||
cell_quadrant_size = 40
|
||||
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 4, 2, 0, 655372, 2, 0 )
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 6 )]
|
||||
position = Vector2( 271, 242 )
|
||||
z_index = 7
|
||||
script = ExtResource( 20 )
|
||||
|
||||
[node name="EnemyAI" type="Node2D" parent="."]
|
||||
position = Vector2( -1, 0 )
|
||||
script = ExtResource( 21 )
|
||||
|
||||
[node name="EnemyFiend" parent="EnemyAI" instance=ExtResource( 7 )]
|
||||
position = Vector2( 30, 53 )
|
||||
z_index = 8
|
||||
z_as_relative = false
|
||||
script = ExtResource( 23 )
|
||||
|
||||
[node name="EnemyLizardMan" parent="EnemyAI" instance=ExtResource( 19 )]
|
||||
position = Vector2( 330, 128 )
|
||||
z_index = 8
|
||||
z_as_relative = false
|
||||
script = ExtResource( 22 )
|
||||
|
||||
[node name="EnemyOgre" parent="EnemyAI" instance=ExtResource( 18 )]
|
||||
position = Vector2( 9, 132 )
|
||||
z_index = 8
|
||||
script = ExtResource( 24 )
|
||||
|
||||
[node name="EnemySlime" parent="EnemyAI" instance=ExtResource( 16 )]
|
||||
position = Vector2( 309, 52 )
|
||||
z_index = 8
|
||||
script = ExtResource( 25 )
|
||||
|
||||
[node name="MapGenerated" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
[node name="WallBlades" parent="MapGenerated" index="0"]
|
||||
z_index = 2
|
||||
z_as_relative = false
|
||||
|
||||
[node name="MagicWalls" parent="MapGenerated" index="2"]
|
||||
z_index = 5
|
||||
|
||||
[node name="MiscTreasure" parent="MapGenerated" index="3"]
|
||||
tile_set = SubResource( 8 )
|
||||
|
||||
[editable path="MapGenerated"]
|
||||
316
player/Player.gd
Normal file
|
|
@ -0,0 +1,316 @@
|
|||
class_name Player
|
||||
extends Area2D
|
||||
|
||||
onready var game := $"/root/Game" as Game
|
||||
onready var global := get_node("/root/Global") as Global
|
||||
onready var dungeon = game.find_node_by_name("Dungeon") # cyclic
|
||||
onready var treasure = game.find_node_by_name("Treasure")
|
||||
onready var door_fore := game.find_node_by_name("DoorFore") as DoorFore
|
||||
onready var markers := game.find_node_by_name("Markers") as Markers
|
||||
onready var magic_walls := game.find_node_by_name("MagicWalls") # cyclic
|
||||
onready var score_label := game.find_node_by_name("ScoreLabel") as ScoreLabel
|
||||
onready var walking_sound := game.find_node_by_name("WalkingSound") as AudioStreamPlayer
|
||||
|
||||
# enemy speed is derived form this
|
||||
export var speed = 70
|
||||
|
||||
var direction = Vector2.ZERO
|
||||
|
||||
var old_direction = Vector2.ZERO
|
||||
var old_position = Vector2.ZERO
|
||||
|
||||
var new_direction = Vector2.ZERO
|
||||
var new_rotation = deg2rad(0)
|
||||
|
||||
var is_casting_magic_wall = true
|
||||
var is_player_loading_next_level = false
|
||||
|
||||
# for enemy ai
|
||||
var last_map_pos_array := []
|
||||
const NUM_MAP_POSITIONS_TO_REMEMBER = 3
|
||||
|
||||
|
||||
func _ready():
|
||||
last_map_pos_array.resize(NUM_MAP_POSITIONS_TO_REMEMBER)
|
||||
|
||||
|
||||
func _physics_process(_delta):
|
||||
if (
|
||||
self.get_overlapping_areas().size() > 0
|
||||
and global.is_player_alive
|
||||
and global.state == global.states.ENTERED_MAZE
|
||||
):
|
||||
player_dies()
|
||||
#pass
|
||||
|
||||
|
||||
func _process(delta: float):
|
||||
#var temp_state := global.state
|
||||
|
||||
if (
|
||||
!(global.state == global.states.ENTERED_MAZE or global.state == global.states.PLAYER_WAITING_TO_ENTER)
|
||||
# needed or else the player can move after death
|
||||
or is_player_loading_next_level
|
||||
):
|
||||
return
|
||||
|
||||
old_direction = direction
|
||||
old_position = position
|
||||
|
||||
_get_input()
|
||||
|
||||
# TODO move this to end of method?
|
||||
_move(delta)
|
||||
|
||||
# player got all coins and went through door
|
||||
if (
|
||||
global.state == global.states.ENTERED_MAZE
|
||||
and door_fore.has_player_exited_level(dungeon.world_to_map(position))
|
||||
and !is_player_loading_next_level
|
||||
):
|
||||
is_player_loading_next_level = true
|
||||
global.load_next_level(true)
|
||||
|
||||
# player got all coins and died before entering door, just go to next level after death
|
||||
if (
|
||||
global.state == global.states.PLAYER_WAITING_TO_ENTER
|
||||
and treasure.get_total_coins_left() == 0
|
||||
and !is_player_loading_next_level
|
||||
):
|
||||
is_player_loading_next_level = true
|
||||
global.load_next_level(true)
|
||||
|
||||
if markers.is_triggering_start_button(position):
|
||||
if global.state != global.states.ENTERED_MAZE:
|
||||
global.set_state(global.states.ENTERED_MAZE)
|
||||
door_fore.close_doors()
|
||||
elif global.state == global.states.ENTERED_MAZE and treasure.get_total_coins_left() != 0:
|
||||
door_fore.close_doors()
|
||||
|
||||
if is_casting_magic_wall:
|
||||
magic_walls.cast_magic_wall(position, direction)
|
||||
is_casting_magic_wall = false
|
||||
|
||||
if treasure.get_treasure(position):
|
||||
# sound is played in treasure class
|
||||
pass
|
||||
elif dungeon.world_to_map(position) != dungeon.world_to_map(old_position):
|
||||
walking_sound.play()
|
||||
|
||||
position = dungeon.handle_possible_screen_wrap(position, direction, false)
|
||||
|
||||
if old_position.x > position.x:
|
||||
$AnimatedSprite.flip_h = true
|
||||
elif old_position.x < position.x:
|
||||
$AnimatedSprite.flip_h = false
|
||||
|
||||
_save_position_for_later()
|
||||
|
||||
|
||||
func _get_input():
|
||||
is_casting_magic_wall = false
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
new_direction = Vector2.UP
|
||||
new_rotation = deg2rad(-90)
|
||||
elif Input.is_action_pressed("ui_down"):
|
||||
new_direction = Vector2.DOWN
|
||||
new_rotation = deg2rad(90)
|
||||
elif Input.is_action_pressed("ui_left"):
|
||||
new_direction = Vector2.LEFT
|
||||
new_rotation = deg2rad(180)
|
||||
elif Input.is_action_pressed("ui_right"):
|
||||
new_direction = Vector2.RIGHT
|
||||
new_rotation = deg2rad(0)
|
||||
|
||||
# cast magic walls
|
||||
elif Input.is_action_pressed("ui_space"):
|
||||
is_casting_magic_wall = true
|
||||
elif Input.is_action_just_released("ui_space"):
|
||||
is_casting_magic_wall = true
|
||||
else:
|
||||
new_direction = direction
|
||||
|
||||
# TODO debug only
|
||||
if false:
|
||||
if Input.is_action_just_released("open_doors"):
|
||||
door_fore.open_doors()
|
||||
if Input.is_action_just_released("next_level"):
|
||||
global.load_next_level(false)
|
||||
if Input.is_action_just_released("debug_add_to_score"):
|
||||
score_label.update_score(2260)
|
||||
if Input.is_action_just_released("debug_lose_life"):
|
||||
player_dies()
|
||||
if Input.is_action_just_released("debug_get_0"):
|
||||
global.debug_get_misc_treasure(0)
|
||||
if Input.is_action_just_released("debug_get_1"):
|
||||
global.debug_get_misc_treasure(1)
|
||||
if Input.is_action_just_released("debug_get_2"):
|
||||
global.debug_get_misc_treasure(2)
|
||||
if Input.is_action_just_released("debug_get_3"):
|
||||
global.debug_get_misc_treasure(3)
|
||||
if Input.is_action_just_released("debug_get_4"):
|
||||
global.debug_get_misc_treasure(4)
|
||||
if Input.is_action_just_released("debug_get_5"):
|
||||
global.debug_get_misc_treasure(5)
|
||||
if Input.is_action_just_released("debug_get_6"):
|
||||
global.debug_get_misc_treasure(6)
|
||||
if Input.is_action_just_released("debug_get_7"):
|
||||
global.debug_get_misc_treasure(7)
|
||||
if Input.is_action_just_released("debug_get_8"):
|
||||
global.debug_get_misc_treasure(8)
|
||||
if Input.is_action_just_released("debug_get_9"):
|
||||
global.debug_get_misc_treasure(9)
|
||||
|
||||
|
||||
func _move(delta: float) -> void:
|
||||
var map_pos: Vector2 = dungeon.world_to_map(position)
|
||||
var current_map_pos_center: Vector2 = dungeon.map_to_world(map_pos)
|
||||
|
||||
# center in tilemap
|
||||
current_map_pos_center.x += dungeon.HALF_CELL_SIZE.x
|
||||
# dont center player on half tile
|
||||
if dungeon.get_cellv(map_pos) != dungeon.TILE_HALF_ENTRANCE:
|
||||
current_map_pos_center.y += dungeon.HALF_CELL_SIZE.y
|
||||
|
||||
# next tile can
|
||||
if dungeon.is_cell_tile_navigable(map_pos + new_direction):
|
||||
direction = new_direction
|
||||
|
||||
# TODOis able to move to next tile?
|
||||
# TODO this needs be cleaned up
|
||||
# TODO somewhere there is a bug with the player going beyone the center grid
|
||||
if dungeon.is_cell_tile_navigable(map_pos + direction) and direction != Vector2.ZERO:
|
||||
# is changing direction
|
||||
if (
|
||||
(position != current_map_pos_center)
|
||||
and (old_direction != Vector2.ZERO and (direction != old_direction or direction == Vector2.ZERO))
|
||||
):
|
||||
if _is_new_direction_x_tangent():
|
||||
var velocity = speed * delta * direction
|
||||
var target_pos = position + velocity
|
||||
var distance = target_pos.x - current_map_pos_center.x
|
||||
#print(["position=",position,", velocity=",velocity,", target_pos=",target_pos,", distance=",distance, ", current_map_pos_center=",current_map_pos_center])
|
||||
if distance < velocity.x:
|
||||
#change direction
|
||||
#print(["negative distance.x=",distance.x])
|
||||
position = target_pos
|
||||
position.y = current_map_pos_center.y
|
||||
|
||||
else:
|
||||
#keep going
|
||||
direction = old_direction
|
||||
position += speed * delta * direction
|
||||
|
||||
elif _is_new_direction_y_tangent():
|
||||
var velocity = speed * delta * direction
|
||||
var target_pos = position + velocity
|
||||
var distance = target_pos.y - current_map_pos_center.y
|
||||
|
||||
if distance < velocity.y:
|
||||
#print(["negative distance.x=",distance.x])
|
||||
position = target_pos
|
||||
position.x = current_map_pos_center.x
|
||||
|
||||
else:
|
||||
direction = old_direction
|
||||
position += speed * delta * direction
|
||||
|
||||
else:
|
||||
position += speed * delta * direction
|
||||
else:
|
||||
position += speed * delta * direction
|
||||
|
||||
else:
|
||||
# handle collision
|
||||
if position != current_map_pos_center:
|
||||
# if X
|
||||
if direction == Vector2.LEFT or direction == Vector2.RIGHT:
|
||||
var velocity = speed * delta * direction
|
||||
var target_pos = position + velocity
|
||||
#var distance = target_pos.x - current_map_pos_center.x
|
||||
|
||||
#print(["position=",position,", velocity=",velocity,", target_pos=",target_pos,", distance=",distance, ", current_map_pos_center=",current_map_pos_center])
|
||||
|
||||
if (
|
||||
target_pos.x < current_map_pos_center.x
|
||||
or (direction == Vector2.LEFT and position.x < current_map_pos_center.x)
|
||||
or (direction == Vector2.RIGHT and position.x > current_map_pos_center.x)
|
||||
):
|
||||
position = current_map_pos_center
|
||||
|
||||
else:
|
||||
direction = old_direction
|
||||
position += speed * delta * direction
|
||||
|
||||
# if Y
|
||||
elif direction == Vector2.UP or direction == Vector2.DOWN:
|
||||
var velocity = speed * delta * direction
|
||||
var target_pos = position + velocity
|
||||
#var distance = target_pos.y - current_map_pos_center.y
|
||||
|
||||
#print(["position=",position,", velocity=",velocity,", target_pos=",target_pos,", distance=",distance, ", current_map_pos_center=",current_map_pos_center])
|
||||
|
||||
#TODO is this needed?
|
||||
var future_tile: Vector2 = dungeon.world_to_map(target_pos)
|
||||
var futre_current_map_pos_center = dungeon.map_to_world(future_tile)
|
||||
futre_current_map_pos_center.x += dungeon.HALF_CELL_SIZE.x
|
||||
var future_type_type = dungeon.get_cellv(future_tile)
|
||||
|
||||
# if player has passed current tile center position
|
||||
if (
|
||||
target_pos.y < current_map_pos_center.y
|
||||
or (direction == Vector2.UP and position.y < current_map_pos_center.y)
|
||||
or (direction == Vector2.DOWN and position.y > current_map_pos_center.y)
|
||||
):
|
||||
position = current_map_pos_center
|
||||
else:
|
||||
direction = old_direction
|
||||
position += speed * delta * direction
|
||||
|
||||
if old_position == position and position != current_map_pos_center:
|
||||
position = current_map_pos_center
|
||||
|
||||
|
||||
func player_dies():
|
||||
global.player_dies()
|
||||
stop_animation()
|
||||
is_player_loading_next_level = true
|
||||
|
||||
|
||||
func stop_animation():
|
||||
$AnimatedSprite.stop()
|
||||
|
||||
|
||||
func start_animation():
|
||||
$AnimatedSprite.start()
|
||||
|
||||
|
||||
# track position for enemy ai
|
||||
func _save_position_for_later() -> void:
|
||||
var last_map_pos = last_map_pos_array.front()
|
||||
var current_map_pos := dungeon.world_to_map(position) as Vector2
|
||||
if last_map_pos == null or last_map_pos != current_map_pos:
|
||||
last_map_pos_array.push_front(current_map_pos)
|
||||
last_map_pos_array.resize(NUM_MAP_POSITIONS_TO_REMEMBER)
|
||||
|
||||
|
||||
func _is_new_direction_x_tangent():
|
||||
if old_direction == Vector2.ZERO and (new_direction == Vector2.DOWN or new_direction == Vector2.UP):
|
||||
return true
|
||||
elif old_direction == Vector2.LEFT and (new_direction == Vector2.DOWN or new_direction == Vector2.UP):
|
||||
return true
|
||||
elif old_direction == Vector2.RIGHT and (new_direction == Vector2.DOWN or new_direction == Vector2.UP):
|
||||
return true
|
||||
else:
|
||||
return false
|
||||
|
||||
|
||||
func _is_new_direction_y_tangent():
|
||||
if direction == Vector2.ZERO and (new_direction == Vector2.DOWN or new_direction == Vector2.UP):
|
||||
return true
|
||||
elif old_direction == Vector2.UP and (new_direction == Vector2.LEFT or new_direction == Vector2.RIGHT):
|
||||
return true
|
||||
elif old_direction == Vector2.DOWN and (new_direction == Vector2.LEFT or new_direction == Vector2.RIGHT):
|
||||
return true
|
||||
else:
|
||||
return false
|
||||
BIN
player/Player.png
Normal file
|
After Width: | Height: | Size: 645 B |
34
player/Player.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Player.png-e2f068cfb4b8070c2a78660082e51208.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player/Player.png"
|
||||
dest_files=[ "res://.import/Player.png-e2f068cfb4b8070c2a78660082e51208.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
76
player/Player.tscn
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
[gd_scene load_steps=13 format=2]
|
||||
|
||||
[ext_resource path="res://player/Player.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 16, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 16, 0, 16, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 32, 0, 16, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 48, 0, 16, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 64, 0, 16, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 80, 0, 16, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=7]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 96, 0, 16, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 112, 0, 16, 28 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=9]
|
||||
flags = 4
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 128, 0, 16, 28 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=10]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=11]
|
||||
extents = Vector2( 5.32618, 8.10972 )
|
||||
|
||||
[node name="Player" type="Area2D"]
|
||||
position = Vector2( 0, -22 )
|
||||
rotation = 0.0174533
|
||||
z_index = 3
|
||||
z_as_relative = false
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( -0.999848, 0.0174522 )
|
||||
frames = SubResource( 10 )
|
||||
frame = 7
|
||||
playing = true
|
||||
offset = Vector2( 0, -8 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0.358444, -3.87179 )
|
||||
shape = SubResource( 11 )
|
||||
362
project.godot
Normal file
|
|
@ -0,0 +1,362 @@
|
|||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ {
|
||||
"base": "RichTextLabel",
|
||||
"class": "ChestHoverScoreLabel",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/overlay/treasure/hover_score_label/TreasureChestHoverScoreLabel.gd"
|
||||
}, {
|
||||
"base": "WanderState",
|
||||
"class": "ClydeState",
|
||||
"language": "GDScript",
|
||||
"path": "res://enemy/ai/states/ClydeState.gd"
|
||||
}, {
|
||||
"base": "CanvasModulate",
|
||||
"class": "DeathScreenTransition",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/gameover/GameOverCanvasModulate.gd"
|
||||
}, {
|
||||
"base": "TileMap",
|
||||
"class": "DoorBack",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/door/DoorBack.gd"
|
||||
}, {
|
||||
"base": "TileMap",
|
||||
"class": "DoorFore",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/door/DoorFore.gd"
|
||||
}, {
|
||||
"base": "TileMap",
|
||||
"class": "Dungeon",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/dungeon/Dungeon.gd"
|
||||
}, {
|
||||
"base": "Area2D",
|
||||
"class": "Enemy",
|
||||
"language": "GDScript",
|
||||
"path": "res://enemy/Enemy.gd"
|
||||
}, {
|
||||
"base": "Area2D",
|
||||
"class": "EnemyState",
|
||||
"language": "GDScript",
|
||||
"path": "res://enemy/ai/EnemyState.gd"
|
||||
}, {
|
||||
"base": "TileMap",
|
||||
"class": "FloorSpikes",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/map_generated/floorspikes/FloorSpikes.gd"
|
||||
}, {
|
||||
"base": "Node2D",
|
||||
"class": "Game",
|
||||
"language": "GDScript",
|
||||
"path": "res://global/Game.gd"
|
||||
}, {
|
||||
"base": "Tween",
|
||||
"class": "GameStartMusicTween",
|
||||
"language": "GDScript",
|
||||
"path": "res://audio/GameStartMusicTween.gd"
|
||||
}, {
|
||||
"base": "RichTextLabel",
|
||||
"class": "HighScoreLabel",
|
||||
"language": "GDScript",
|
||||
"path": "res://ui/HighScoreLabel.gd"
|
||||
}, {
|
||||
"base": "EnemyState",
|
||||
"class": "IdleState",
|
||||
"language": "GDScript",
|
||||
"path": "res://enemy/ai/states/IdleState.gd"
|
||||
}, {
|
||||
"base": "RichTextLabel",
|
||||
"class": "LevelLabel",
|
||||
"language": "GDScript",
|
||||
"path": "res://ui/LevelLabel.gd"
|
||||
}, {
|
||||
"base": "TileMap",
|
||||
"class": "MagicWalls",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/map_generated/magicwalls/MagicWalls.gd"
|
||||
}, {
|
||||
"base": "TileMap",
|
||||
"class": "Markers",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/markers/Markers.gd"
|
||||
}, {
|
||||
"base": "RichTextLabel",
|
||||
"class": "MiscHoverScoreLabel",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/overlay/treasure/hover_score_label/MiscTreasureHoverScoreLabel.gd"
|
||||
}, {
|
||||
"base": "TileMap",
|
||||
"class": "Overlay",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/overlay/Overlay.gd"
|
||||
}, {
|
||||
"base": "Node2D",
|
||||
"class": "PathFind",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/dungeon/Pathfind.gd"
|
||||
}, {
|
||||
"base": "Area2D",
|
||||
"class": "Player",
|
||||
"language": "GDScript",
|
||||
"path": "res://player/Player.gd"
|
||||
}, {
|
||||
"base": "ColorRect",
|
||||
"class": "SceneTransition",
|
||||
"language": "GDScript",
|
||||
"path": "res://ui/SceneTransitionRect.gd"
|
||||
}, {
|
||||
"base": "RichTextLabel",
|
||||
"class": "ScoreLabel",
|
||||
"language": "GDScript",
|
||||
"path": "res://ui/Score.gd"
|
||||
}, {
|
||||
"base": "EnemyState",
|
||||
"class": "SeekAheadState",
|
||||
"language": "GDScript",
|
||||
"path": "res://enemy/ai/states/SeekAheadState.gd"
|
||||
}, {
|
||||
"base": "EnemyState",
|
||||
"class": "SeekBehindState",
|
||||
"language": "GDScript",
|
||||
"path": "res://enemy/ai/states/SeekBehindState.gd"
|
||||
}, {
|
||||
"base": "EnemyState",
|
||||
"class": "SeekState",
|
||||
"language": "GDScript",
|
||||
"path": "res://enemy/ai/states/SeekState.gd"
|
||||
}, {
|
||||
"base": "TileMap",
|
||||
"class": "Treasure",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/overlay/treasure/Treasure.gd"
|
||||
}, {
|
||||
"base": "Node",
|
||||
"class": "UILives",
|
||||
"language": "GDScript",
|
||||
"path": "res://ui/uilives/UILives.gd"
|
||||
}, {
|
||||
"base": "Node",
|
||||
"class": "UIWalls",
|
||||
"language": "GDScript",
|
||||
"path": "res://ui/uiwalls/UIWalls.gd"
|
||||
}, {
|
||||
"base": "TileMap",
|
||||
"class": "WallBlades",
|
||||
"language": "GDScript",
|
||||
"path": "res://world/map_generated/wallblades/WallBlades.gd"
|
||||
}, {
|
||||
"base": "EnemyState",
|
||||
"class": "WanderState",
|
||||
"language": "GDScript",
|
||||
"path": "res://enemy/ai/states/WanderState.gd"
|
||||
} ]
|
||||
_global_script_class_icons={
|
||||
"ChestHoverScoreLabel": "",
|
||||
"ClydeState": "",
|
||||
"DeathScreenTransition": "",
|
||||
"DoorBack": "",
|
||||
"DoorFore": "",
|
||||
"Dungeon": "",
|
||||
"Enemy": "",
|
||||
"EnemyState": "",
|
||||
"FloorSpikes": "",
|
||||
"Game": "",
|
||||
"GameStartMusicTween": "",
|
||||
"HighScoreLabel": "",
|
||||
"IdleState": "",
|
||||
"LevelLabel": "",
|
||||
"MagicWalls": "",
|
||||
"Markers": "",
|
||||
"MiscHoverScoreLabel": "",
|
||||
"Overlay": "",
|
||||
"PathFind": "",
|
||||
"Player": "",
|
||||
"SceneTransition": "",
|
||||
"ScoreLabel": "",
|
||||
"SeekAheadState": "",
|
||||
"SeekBehindState": "",
|
||||
"SeekState": "",
|
||||
"Treasure": "",
|
||||
"UILives": "",
|
||||
"UIWalls": "",
|
||||
"WallBlades": "",
|
||||
"WanderState": ""
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Wizard Chase"
|
||||
config/description="Collect all the treasure in the dungeon! Can you make it to the second level? Leave your highest score in the comments. Good luck!
|
||||
|
||||
github
|
||||
https://github.com/clarkjohn/wizard-chase
|
||||
|
||||
itch.io
|
||||
https://clarkjohn.itch.io/wizard
|
||||
"
|
||||
run/main_scene="res://global/Game.tscn"
|
||||
config/icon="res://assets/icon.png"
|
||||
config/windows_native_icon="res://assets/windows/icon.ico"
|
||||
|
||||
[autoload]
|
||||
|
||||
Global="*res://global/Global.gd"
|
||||
|
||||
[debug]
|
||||
|
||||
gdscript/warnings/unused_class_variable=true
|
||||
|
||||
[display]
|
||||
|
||||
window/size/width=340
|
||||
window/size/height=260
|
||||
window/size/test_width=680
|
||||
window/size/test_height=520
|
||||
window/ios/hide_home_indicator=false
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="keep"
|
||||
|
||||
[global]
|
||||
|
||||
export=false
|
||||
|
||||
[input]
|
||||
|
||||
ui_accept={
|
||||
"deadzone": 0.5,
|
||||
"events": [ ]
|
||||
}
|
||||
ui_focus_next={
|
||||
"deadzone": 0.5,
|
||||
"events": [ ]
|
||||
}
|
||||
ui_left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_page_up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ ]
|
||||
}
|
||||
ui_end={
|
||||
"deadzone": 0.5,
|
||||
"events": [ ]
|
||||
}
|
||||
ui_space={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
next_level={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":78,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
open_doors={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":79,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_add_to_score={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":66,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_lose_life={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":76,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_0={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":48,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_1={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":49,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_2={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":50,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_3={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":51,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_4={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":52,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_5={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":53,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_6={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":54,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_7={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":55,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_8={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":56,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_get_9={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":57,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
common/enable_pause_aware_picking=true
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_clear_color=Color( 0.133333, 0.133333, 0.133333, 1 )
|
||||
quality/dynamic_fonts/use_oversampling=false
|
||||
20
ui/HighScoreLabel.gd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
class_name HighScoreLabel
|
||||
extends RichTextLabel
|
||||
|
||||
onready var global = get_node("/root/Global") as Global
|
||||
onready var score_label := $"../ScoreLabel"
|
||||
|
||||
|
||||
func _ready():
|
||||
bbcode_text = "[center]%s[/center]" % score_label.get_color_score(global.high_score, 6)
|
||||
|
||||
|
||||
func update_highscore2(current_score: int) -> void:
|
||||
if global.high_score < current_score:
|
||||
global.high_score = current_score
|
||||
|
||||
bbcode_text = "[right]%s[/right]" % global.high_score
|
||||
|
||||
|
||||
func update_highscore(bbcode: String) -> void:
|
||||
bbcode_text = "[center]%s[/center]" % bbcode
|
||||
13
ui/LevelLabel.gd
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
class_name LevelLabel
|
||||
extends RichTextLabel
|
||||
|
||||
onready var global := get_node("/root/Global") #
|
||||
onready var score_label := $"../ScoreLabel"
|
||||
|
||||
|
||||
func _ready():
|
||||
update_level()
|
||||
|
||||
|
||||
func update_level():
|
||||
bbcode_text = "[center]%s[/center]" % score_label.get_color_score(global.current_level, 2)
|
||||
30
ui/SceneTransitionRect.gd
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
class_name SceneTransition
|
||||
extends ColorRect
|
||||
|
||||
onready var _anim_player := $AnimationPlayer as AnimationPlayer
|
||||
onready var level_label := $"../UI/LevelLabel" as LevelLabel
|
||||
|
||||
onready var global := get_node("/root/Global") as Global
|
||||
|
||||
|
||||
func transition_to(_next_scene_path: String) -> void:
|
||||
_anim_player.play("Fade")
|
||||
yield(_anim_player, "animation_finished")
|
||||
|
||||
var world := get_tree().get_root().get_node("Game/World")
|
||||
var level = get_tree().get_root().get_node("Game/World/Level")
|
||||
|
||||
world.remove_child(level)
|
||||
level.queue_free()
|
||||
|
||||
var next_level_resource = load(_next_scene_path)
|
||||
var next_level = next_level_resource.instance()
|
||||
next_level.name = "Level"
|
||||
world.add_child(next_level)
|
||||
|
||||
level_label.update_level()
|
||||
|
||||
_anim_player.play_backwards("Fade")
|
||||
|
||||
global.is_player_alive = true
|
||||
global.set_state(global.states.PLAYER_WAITING_TO_ENTER)
|
||||
32
ui/SceneTransitionRect.tscn
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://ui/SceneTransitionRect.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "Fade"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath(".:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.5 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 1, 1, 0 ), Color( 0, 0, 0, 1 ) ]
|
||||
}
|
||||
|
||||
[node name="SceneTransition" type="ColorRect"]
|
||||
modulate = Color( 1, 1, 1, 0 )
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/Fade = SubResource( 1 )
|
||||
47
ui/Score.gd
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
class_name ScoreLabel
|
||||
extends RichTextLabel
|
||||
|
||||
onready var global := get_node("/root/Global") as Global
|
||||
onready var high_score := $"../HighScoreLabel" as HighScoreLabel
|
||||
|
||||
const LENGTH_OF_SCORE := 6
|
||||
const COLOR_PADDED_ZERO := "fdf7ed"
|
||||
const COLOR_SCORE := "ffad3b"
|
||||
|
||||
|
||||
func _ready():
|
||||
format_score()
|
||||
|
||||
|
||||
func update_score(score_increase: int) -> void:
|
||||
if global != null:
|
||||
global.current_score += score_increase
|
||||
format_score()
|
||||
|
||||
|
||||
func format_score() -> void:
|
||||
var bbcode_score := get_color_score(global.current_score, LENGTH_OF_SCORE)
|
||||
bbcode_text = "[center]%s[/center]" % bbcode_score
|
||||
|
||||
if global.current_score > global.high_score:
|
||||
high_score.update_highscore(bbcode_score)
|
||||
|
||||
|
||||
func get_color_score(score: int, total_length: int) -> String:
|
||||
var bbcode_score := ""
|
||||
var string_format = str("%0" + str(total_length) + "d")
|
||||
var padded_score := str(string_format % score)
|
||||
|
||||
if padded_score.length() <= total_length and padded_score[0] == "0":
|
||||
bbcode_score = "[color=#" + COLOR_PADDED_ZERO + "]"
|
||||
for i in padded_score:
|
||||
if i == "0":
|
||||
bbcode_score = bbcode_score + "0"
|
||||
else:
|
||||
bbcode_score = bbcode_score + "[/color][color=#" + COLOR_SCORE + "]" + str(score) + "[/color]"
|
||||
return bbcode_score
|
||||
return bbcode_score + "[/color]"
|
||||
else:
|
||||
bbcode_score = "[color=#" + COLOR_SCORE + "]" + str(score) + "[/color]"
|
||||
|
||||
return bbcode_score
|
||||
11
ui/UIInventory.gd
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
extends Node
|
||||
|
||||
|
||||
func _ready():
|
||||
hide_all()
|
||||
|
||||
|
||||
func hide_all() -> void:
|
||||
for i in self.get_child_count():
|
||||
var node = self.get_child(i) as TextureRect
|
||||
node.visible = false
|
||||
BIN
ui/uiinventory/10_great_sword.png
Normal file
|
After Width: | Height: | Size: 292 B |
34
ui/uiinventory/10_great_sword.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/10_great_sword.png-5a746fe5ab387ef3f85a764737275ec7.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/10_great_sword.png"
|
||||
dest_files=[ "res://.import/10_great_sword.png-5a746fe5ab387ef3f85a764737275ec7.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
BIN
ui/uiinventory/1_staff.png
Normal file
|
After Width: | Height: | Size: 239 B |
34
ui/uiinventory/1_staff.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/1_staff.png-c282971b0ceea4507d9504262529ac2e.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/1_staff.png"
|
||||
dest_files=[ "res://.import/1_staff.png-c282971b0ceea4507d9504262529ac2e.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
BIN
ui/uiinventory/2_gold_shortsword.aseprite
Normal file
BIN
ui/uiinventory/2_gold_shortsword.png
Normal file
|
After Width: | Height: | Size: 252 B |
34
ui/uiinventory/2_gold_shortsword.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/2_gold_shortsword.png-278235c08aaf149c70c76d494fe6354e.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/2_gold_shortsword.png"
|
||||
dest_files=[ "res://.import/2_gold_shortsword.png-278235c08aaf149c70c76d494fe6354e.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
BIN
ui/uiinventory/3_orange_potion.png
Normal file
|
After Width: | Height: | Size: 306 B |
34
ui/uiinventory/3_orange_potion.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/3_orange_potion.png-4c4c6967378ba9314a06800e97a159c8.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/3_orange_potion.png"
|
||||
dest_files=[ "res://.import/3_orange_potion.png-4c4c6967378ba9314a06800e97a159c8.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
BIN
ui/uiinventory/4_silversword.png
Normal file
|
After Width: | Height: | Size: 311 B |
34
ui/uiinventory/4_silversword.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/4_silversword.png-654774465d81c2c2019b91c069d0bad9.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/4_silversword.png"
|
||||
dest_files=[ "res://.import/4_silversword.png-654774465d81c2c2019b91c069d0bad9.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
BIN
ui/uiinventory/5_bow.png
Normal file
|
After Width: | Height: | Size: 282 B |
34
ui/uiinventory/5_bow.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/5_bow.png-200f451afdb7443e2b7e10f65e185e53.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/5_bow.png"
|
||||
dest_files=[ "res://.import/5_bow.png-200f451afdb7443e2b7e10f65e185e53.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
BIN
ui/uiinventory/6_green_potion.png
Normal file
|
After Width: | Height: | Size: 278 B |
34
ui/uiinventory/6_green_potion.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/6_green_potion.png-f7a51b541f15601d9b9ebba25fd9c9d6.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/6_green_potion.png"
|
||||
dest_files=[ "res://.import/6_green_potion.png-f7a51b541f15601d9b9ebba25fd9c9d6.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
BIN
ui/uiinventory/7_red_staff.png
Normal file
|
After Width: | Height: | Size: 210 B |
34
ui/uiinventory/7_red_staff.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/7_red_staff.png-13dd917aa8bc2f3d19e03892483359e2.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/7_red_staff.png"
|
||||
dest_files=[ "res://.import/7_red_staff.png-13dd917aa8bc2f3d19e03892483359e2.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
BIN
ui/uiinventory/8_dagger.png
Normal file
|
After Width: | Height: | Size: 174 B |
34
ui/uiinventory/8_dagger.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/8_dagger.png-e1d84a6565391de84c3efc98cb534d40.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/8_dagger.png"
|
||||
dest_files=[ "res://.import/8_dagger.png-e1d84a6565391de84c3efc98cb534d40.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
BIN
ui/uiinventory/9_blue_potion.png
Normal file
|
After Width: | Height: | Size: 276 B |
34
ui/uiinventory/9_blue_potion.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/9_blue_potion.png-b0a534f1bdb95dfc90b197b42cf24211.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://ui/uiinventory/9_blue_potion.png"
|
||||
dest_files=[ "res://.import/9_blue_potion.png-b0a534f1bdb95dfc90b197b42cf24211.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=true
|
||||
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=true
|
||||
svg/scale=1.0
|
||||
21
ui/uilives/UILives.gd
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
class_name UILives
|
||||
extends Node
|
||||
|
||||
|
||||
func _ready():
|
||||
reset_ui_lives()
|
||||
|
||||
|
||||
func reset_ui_lives() -> void:
|
||||
for i in 4:
|
||||
var node = self.get_child(i) as TextureRect
|
||||
if $"/root/Global".current_player_lives < i + 1:
|
||||
node.visible = false
|
||||
else:
|
||||
node.visible = true
|
||||
|
||||
|
||||
func hide():
|
||||
for i in 4:
|
||||
var node = self.get_child(i) as TextureRect
|
||||
node.hide()
|
||||