forked from interstellar_development/freettrpg
Minor Changes
This commit is contained in:
parent
01cd337c66
commit
4224f4f755
14 changed files with 278 additions and 0 deletions
9
scenes/menu/create.tscn
Normal file
9
scenes/menu/create.tscn
Normal file
|
@ -0,0 +1,9 @@
|
|||
[gd_scene format=3 uid="uid://b6t6yd7qnid1i"]
|
||||
|
||||
[node name="character_creator" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
38
scripts/createStats.gd
Normal file
38
scripts/createStats.gd
Normal file
|
@ -0,0 +1,38 @@
|
|||
extends Node
|
||||
|
||||
var save_path = "user://player_data.json"
|
||||
|
||||
func saveJSON():
|
||||
var data := {
|
||||
"name": "test",
|
||||
}
|
||||
|
||||
var json_string = JSON.stringify(data)
|
||||
|
||||
var file_access = FileAccess.open(save_path, FileAccess.WRITE)
|
||||
if not file_access:
|
||||
print("An error happened while saving data: ", FileAccess.get_open_error())
|
||||
return
|
||||
|
||||
file_access.store_line(json_string)
|
||||
file_access.close()
|
||||
|
||||
func loadJSON():
|
||||
if not FileAccess.file_exists(save_path):
|
||||
return
|
||||
var file_access = FileAccess.open(save_path, FileAccess.READ)
|
||||
var json_string = file_access.get_line()
|
||||
file_access.close()
|
||||
|
||||
var json = JSON.new()
|
||||
var error = json.parse(json_string)
|
||||
if error:
|
||||
print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line())
|
||||
return
|
||||
|
||||
var data:Dictionary = json.data
|
||||
var test = data.get("name")
|
||||
|
||||
func _on_pressed():
|
||||
saveJSON()
|
||||
loadJSON()
|
42
testing/test/map.tscn
Normal file
42
testing/test/map.tscn
Normal file
File diff suppressed because one or more lines are too long
19
testing/test/player.tscn
Normal file
19
testing/test/player.tscn
Normal file
|
@ -0,0 +1,19 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dv67vdgb4h44q"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dheqglouhkis6" path="res://testing/testAssets/player.png" id="1_cujcj"]
|
||||
[ext_resource type="Script" path="res://scripts/player.gd" id="1_oik63"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_kf6qt"]
|
||||
size = Vector2(20, 18)
|
||||
|
||||
[node name="player" type="CharacterBody2D"]
|
||||
script = ExtResource("1_oik63")
|
||||
|
||||
[node name="sprite" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_cujcj")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_kf6qt")
|
||||
|
||||
[node name="camera" type="Camera2D" parent="."]
|
||||
enabled = false
|
BIN
testing/testAssets/gigachad.png
Normal file
BIN
testing/testAssets/gigachad.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 508 B |
34
testing/testAssets/gigachad.png.import
Normal file
34
testing/testAssets/gigachad.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://slau07w56ipp"
|
||||
path="res://.godot/imported/gigachad.png-950f249fad71ecb8cb5ffe1b8e0aaa85.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://testing/testAssets/gigachad.png"
|
||||
dest_files=["res://.godot/imported/gigachad.png-950f249fad71ecb8cb5ffe1b8e0aaa85.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
|
BIN
testing/testAssets/grass.png
Normal file
BIN
testing/testAssets/grass.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
34
testing/testAssets/grass.png.import
Normal file
34
testing/testAssets/grass.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bgdgd23qgi52x"
|
||||
path="res://.godot/imported/grass.png-9d67070b94003a4c9ef0fabcfb53d979.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://testing/testAssets/grass.png"
|
||||
dest_files=["res://.godot/imported/grass.png-9d67070b94003a4c9ef0fabcfb53d979.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
|
BIN
testing/testAssets/player.png
Normal file
BIN
testing/testAssets/player.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 461 B |
34
testing/testAssets/player.png.import
Normal file
34
testing/testAssets/player.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dheqglouhkis6"
|
||||
path="res://.godot/imported/player.png-a3dc637dcfcac9b2cc12965322007c1c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://testing/testAssets/player.png"
|
||||
dest_files=["res://.godot/imported/player.png-a3dc637dcfcac9b2cc12965322007c1c.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
|
BIN
testing/testAssets/tharok.png
Normal file
BIN
testing/testAssets/tharok.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 540 B |
34
testing/testAssets/tharok.png.import
Normal file
34
testing/testAssets/tharok.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bgwtew3kupb5c"
|
||||
path="res://.godot/imported/tharok.png-60f89b581d56d7a95618ce50dd583112.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://testing/testAssets/tharok.png"
|
||||
dest_files=["res://.godot/imported/tharok.png-60f89b581d56d7a95618ce50dd583112.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
|
BIN
testing/testAssets/water.png
Normal file
BIN
testing/testAssets/water.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
34
testing/testAssets/water.png.import
Normal file
34
testing/testAssets/water.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://chgkgpiiy1yui"
|
||||
path="res://.godot/imported/water.png-455790e486e896b50dab7d58df164d3a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://testing/testAssets/water.png"
|
||||
dest_files=["res://.godot/imported/water.png-455790e486e896b50dab7d58df164d3a.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
|
Loading…
Reference in a new issue