End of lesson 14, World map, terrain data.
This commit is contained in:
parent
e882e0e5fd
commit
fc038ba113
Binary file not shown.
|
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://n75ma6vtgg1n"
|
||||||
|
path="res://.godot/imported/PokemonLike.png-56742e48da9fabb842b8d7c89aee0d95.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://gfx/game/tiles/PokemonLike.png"
|
||||||
|
dest_files=["res://.godot/imported/PokemonLike.png-56742e48da9fabb842b8d7c89aee0d95.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bontlwwdkdkd2"
|
||||||
|
path="res://.godot/imported/colored_packed.png-3acba825e877d53703c17fa54230f8c8.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://gfx/game/tiles/colored_packed.png"
|
||||||
|
dest_files=["res://.godot/imported/colored_packed.png-3acba825e877d53703c17fa54230f8c8.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
|
@ -19,6 +19,7 @@ config/icon="res://icon.svg"
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
Loader="*res://scripts/loader.gd"
|
Loader="*res://scripts/loader.gd"
|
||||||
|
GameManager="*res://scripts/GameManager.gd"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,9 @@
|
||||||
[gd_scene format=3 uid="uid://c0b5w48jk67qd"]
|
[gd_scene load_steps=2 format=3 uid="uid://c0b5w48jk67qd"]
|
||||||
|
|
||||||
[node name="Game" type="Node2D"]
|
[ext_resource type="Script" uid="uid://dq5qq5xj76nwe" path="res://scripts/game/game_screen.gd" id="1_uwrxv"]
|
||||||
|
|
||||||
[node name="Control" type="Control" parent="."]
|
[node name="Game" type="Node" node_paths=PackedStringArray("map")]
|
||||||
layout_mode = 3
|
script = ExtResource("1_uwrxv")
|
||||||
anchors_preset = 15
|
map = NodePath("Map")
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_right = 640.0
|
|
||||||
offset_bottom = 360.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
|
|
||||||
[node name="CenterContainer" type="CenterContainer" parent="Control"]
|
[node name="Map" type="Node" parent="."]
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Control/CenterContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Game!"
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,17 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
var defaultMapPath: String = "res://scenes/game/maps/world_map.tscn"
|
||||||
|
var currentMapPath: String = ""
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func startNewGame():
|
||||||
|
currentMapPath = defaultMapPath
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
uid://0mhwqcwput71
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
class_name GameScreen
|
||||||
|
|
||||||
|
@export var map: Node
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
map.add_child(load(GameManager.currentMapPath).instantiate())
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
pass
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
uid://dq5qq5xj76nwe
|
||||||
|
|
@ -12,4 +12,6 @@ func _process(delta: float) -> void:
|
||||||
|
|
||||||
|
|
||||||
func _on_new_game_button_pressed() -> void:
|
func _on_new_game_button_pressed() -> void:
|
||||||
|
GameManager.startNewGame()
|
||||||
|
|
||||||
Loader.loadScene(self, "res://scenes/game.tscn")
|
Loader.loadScene(self, "res://scenes/game.tscn")
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue