Browse Source

changed project structure

master
mono 6 months ago
parent
commit
c77b17e5a9
  1. BIN
      assets/graphics/_template_humanoid.png
  2. 34
      assets/graphics/_template_humanoid.png.import
  3. BIN
      assets/graphics/template_humanoid.png
  4. 2
      nodes/event/event.gd
  5. 7
      nodes/map/map.gd
  6. 22
      rpgh_engine.tscn
  7. 16
      system/data_management/command_system.gd
  8. 0
      system/data_management/data_manager.gd
  9. 0
      system/data_management/storable.gd
  10. 0
      system/ingame/camera/camera.gd
  11. 0
      system/ingame/camera/ingame_display.material
  12. 0
      system/ingame/humanoid/animation_handler.gd
  13. 0
      system/ingame/humanoid/humanoid.gd
  14. 6
      system/ingame/humanoid/humanoid.tscn
  15. 0
      system/ingame/map_manager/map_manager.gd
  16. 0
      system/ingame/player/player.gd
  17. 4
      system/ingame/player/player.tscn
  18. 5
      system/rpgh_engine.gd
  19. BIN
      system/ui/bust.material
  20. 0
      system/ui/bust_transition.png
  21. 6
      system/ui/bust_transition.png.import
  22. 0
      system/ui/dialog.gd
  23. 0
      system/ui/pause.gd
  24. 0
      system/ui/textbox.gd
  25. BIN
      ui/bust.material

BIN
assets/graphics/_template_humanoid.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

34
assets/graphics/_template_humanoid.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/_template_humanoid.png-8acdc4563ae3cf10090fe952ed7e4d60.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/rpgh_engine/assets/graphics/_template_humanoid.png"
dest_files=[ "res://.import/_template_humanoid.png-8acdc4563ae3cf10090fe952ed7e4d60.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

BIN
assets/graphics/template_humanoid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 19 KiB

2
nodes/event/event.gd

@ -107,7 +107,7 @@ func _get_state():
# Just a fast wrapper for "storable.gd".
class RPGH_Storable:
extends "res://addons/rpgh_engine/data_management/storable.gd"
extends "res://addons/rpgh_engine/system/data_management/storable.gd"
func _init(key: String, value = null, map = null, event = null).(key, value, map, event): pass
func Storable(key: String, value = null) -> RPGH_Storable:
return RPGH_Storable.new(name + key, value, map, self)

7
nodes/map/map.gd

@ -12,6 +12,11 @@ func _init():
func _ready():
if get_parent() == get_tree().get_root():
print("is correct")
get_parent().call_deferred("remove_child", self)
RPGH.MapManager.call_deferred("add_child", self)
if !Engine.editor_hint:
var top_layer_sprite = Sprite.new()
top_layer_sprite.name = "\\TopLayer"
@ -46,7 +51,7 @@ func _set_bottom_layer(new_bottom_layer):
# Just a fast wrapper for "storable.gd".
class RPGH_Storable:
extends "res://addons/rpgh_engine/data_management/storable.gd"
extends "res://addons/rpgh_engine/system/data_management/storable.gd"
func _init(key: String, value = null, map = null, event = null).(key, value, map, event): pass
func Storable(key: String, value = null) -> RPGH_Storable:
return RPGH_Storable.new(key, value, self)

22
rpgh_engine.tscn

@ -1,15 +1,16 @@
[gd_scene load_steps=23 format=2]
[gd_scene load_steps=24 format=2]
[ext_resource path="res://addons/rpgh_engine/data_management/data_manager.gd" type="Script" id=1]
[ext_resource path="res://addons/rpgh_engine/system/data_management/data_manager.gd" type="Script" id=1]
[ext_resource path="res://addons/rpgh_engine/system/rpgh_engine.gd" type="Script" id=2]
[ext_resource path="res://addons/rpgh_engine/ingame/camera/ingame_display.material" type="Material" id=3]
[ext_resource path="res://addons/rpgh_engine/ingame/player/player.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/rpgh_engine/ui/textbox.gd" type="Script" id=5]
[ext_resource path="res://addons/rpgh_engine/ingame/camera/camera.gd" type="Script" id=6]
[ext_resource path="res://addons/rpgh_engine/system/ingame/camera/ingame_display.material" type="Material" id=3]
[ext_resource path="res://addons/rpgh_engine/system/ingame/player/player.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/rpgh_engine/system/ui/textbox.gd" type="Script" id=5]
[ext_resource path="res://addons/rpgh_engine/system/ingame/camera/camera.gd" type="Script" id=6]
[ext_resource path="res://game/maps/hobby_room_corrupted/ako_shocked.png" type="Texture" id=7]
[ext_resource path="res://addons/rpgh_engine/ui/dialog.gd" type="Script" id=8]
[ext_resource path="res://addons/rpgh_engine/ui/pause.gd" type="Script" id=9]
[ext_resource path="res://addons/rpgh_engine/ingame/map_manager/map_manager.gd" type="Script" id=10]
[ext_resource path="res://addons/rpgh_engine/system/ui/dialog.gd" type="Script" id=8]
[ext_resource path="res://addons/rpgh_engine/system/ui/pause.gd" type="Script" id=9]
[ext_resource path="res://addons/rpgh_engine/system/ingame/map_manager/map_manager.gd" type="Script" id=10]
[ext_resource path="res://addons/rpgh_engine/system/data_management/command_system.gd" type="Script" id=11]
[sub_resource type="ViewportTexture" id=1]
flags = 4
@ -344,6 +345,9 @@ script = ExtResource( 2 )
[node name="DataManager" type="Node" parent="."]
script = ExtResource( 1 )
[node name="CommandSystem" type="Node" parent="DataManager"]
script = ExtResource( 11 )
[node name="Ingame" type="Node" parent="."]
[node name="Viewport" type="Viewport" parent="Ingame"]

16
system/data_management/command_system.gd

@ -0,0 +1,16 @@
extends Node
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

0
data_management/data_manager.gd → system/data_management/data_manager.gd

0
data_management/storable.gd → system/data_management/storable.gd

0
ingame/camera/camera.gd → system/ingame/camera/camera.gd

0
ingame/camera/ingame_display.material → system/ingame/camera/ingame_display.material

0
ingame/humanoid/animation_handler.gd → system/ingame/humanoid/animation_handler.gd

0
ingame/humanoid/humanoid.gd → system/ingame/humanoid/humanoid.gd

6
ingame/humanoid/humanoid.tscn → system/ingame/humanoid/humanoid.tscn

@ -1,8 +1,8 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/rpgh_engine/ingame/humanoid/humanoid.gd" type="Script" id=1]
[ext_resource path="res://addons/rpgh_engine/system/ingame/humanoid/humanoid.gd" type="Script" id=1]
[ext_resource path="res://addons/rpgh_engine/assets/graphics/template_humanoid.png" type="Texture" id=2]
[ext_resource path="res://addons/rpgh_engine/ingame/humanoid/animation_handler.gd" type="Script" id=3]
[ext_resource path="res://addons/rpgh_engine/system/ingame/humanoid/animation_handler.gd" type="Script" id=3]
[sub_resource type="RectangleShape2D" id=1]
@ -12,7 +12,7 @@ script = ExtResource( 1 )
[node name="Texture" type="Sprite" parent="."]
texture = ExtResource( 2 )
centered = false
offset = Vector2( 0, -14 )
offset = Vector2( -4, -18 )
hframes = 15
vframes = 8
frame = 60

0
ingame/map_manager/map_manager.gd → system/ingame/map_manager/map_manager.gd

0
ingame/player/player.gd → system/ingame/player/player.gd

4
ingame/player/player.tscn → system/ingame/player/player.tscn

@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/rpgh_engine/ingame/humanoid/humanoid.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/rpgh_engine/ingame/player/player.gd" type="Script" id=2]
[ext_resource path="res://addons/rpgh_engine/system/ingame/humanoid/humanoid.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/rpgh_engine/system/ingame/player/player.gd" type="Script" id=2]
[sub_resource type="RectangleShape2D" id=1]

5
system/rpgh_engine.gd

@ -2,12 +2,9 @@ extends Node
const DEFAULT_SCREEN_SIZE = Vector2(640, 360)
var global_data := {}
onready var DataManager = get_node("DataManager")
onready var CommandSystem = get_node("DataManager/CommandSystem")
onready var MapManager = get_node("Ingame/Viewport/MapManager")
onready var Player = get_node("Ingame/Viewport/MapManager/Player")
onready var Camera = get_node("Ingame/Viewport/MapManager/Camera")
onready var Dialog = get_node("UI/Dialog")

BIN
system/ui/bust.material

Binary file not shown.

0
ui/bust_transition.png → system/ui/bust_transition.png

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

6
ui/bust_transition.png.import → system/ui/bust_transition.png.import

@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/bust_transition.png-4f62a5e234bc14ba3bbb18d047ce1a4f.stex"
path="res://.import/bust_transition.png-5e2024717fbb10df8f29722c43b1b119.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/rpgh_engine/ui/bust_transition.png"
dest_files=[ "res://.import/bust_transition.png-4f62a5e234bc14ba3bbb18d047ce1a4f.stex" ]
source_file="res://addons/rpgh_engine/system/ui/bust_transition.png"
dest_files=[ "res://.import/bust_transition.png-5e2024717fbb10df8f29722c43b1b119.stex" ]
[params]

0
ui/dialog.gd → system/ui/dialog.gd

0
ui/pause.gd → system/ui/pause.gd

0
ui/textbox.gd → system/ui/textbox.gd

BIN
ui/bust.material

Binary file not shown.
Loading…
Cancel
Save