First commit 🎉
This commit is contained in:
commit
43ea213f9b
728 changed files with 37080 additions and 0 deletions
30
game/rooms/prototype/room_prototype.gd
Normal file
30
game/rooms/prototype/room_prototype.gd
Normal file
|
@ -0,0 +1,30 @@
|
|||
@tool
|
||||
extends PopochiuRoom
|
||||
|
||||
const Data := preload('room_prototype_state.gd')
|
||||
|
||||
var state: Data = load("res://game/rooms/prototype/room_prototype.tres")
|
||||
|
||||
|
||||
#region Virtual ####################################################################################
|
||||
# What happens when Popochiu loads the room. At this point the room is in the
|
||||
# tree but it is not visible
|
||||
func _on_room_entered() -> void:
|
||||
pass
|
||||
|
||||
|
||||
# What happens when the room changing transition finishes. At this point the room
|
||||
# is visible.
|
||||
func _on_room_transition_finished() -> void:
|
||||
# You can use await E.queue([]) to execute a sequence of instructions
|
||||
pass
|
||||
|
||||
|
||||
# What happens before Popochiu unloads the room.
|
||||
# At this point, the screen is black, processing is disabled and all characters
|
||||
# have been removed from the $Characters node.
|
||||
func _on_room_exited() -> void:
|
||||
pass
|
||||
|
||||
|
||||
#endregion
|
1
game/rooms/prototype/room_prototype.gd.uid
Normal file
1
game/rooms/prototype/room_prototype.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://dapgroaks34mk
|
12
game/rooms/prototype/room_prototype.tres
Normal file
12
game/rooms/prototype/room_prototype.tres
Normal file
|
@ -0,0 +1,12 @@
|
|||
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://q3pshdc1vhf0"]
|
||||
|
||||
[ext_resource type="Script" path="res://game/rooms/prototype/room_prototype_state.gd" id="1_qpcup"]
|
||||
|
||||
[resource]
|
||||
resource_name = "Prototype"
|
||||
script = ExtResource("1_qpcup")
|
||||
script_name = "Prototype"
|
||||
scene = "res://game/rooms/prototype/room_prototype.tscn"
|
||||
visited = false
|
||||
visited_first_time = false
|
||||
visited_times = 0
|
26
game/rooms/prototype/room_prototype.tscn
Normal file
26
game/rooms/prototype/room_prototype.tscn
Normal file
|
@ -0,0 +1,26 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://blf7nc5w0ygpa"]
|
||||
|
||||
[ext_resource type="Script" path="res://game/rooms/prototype/room_prototype.gd" id="1_eii3y"]
|
||||
[ext_resource type="PackedScene" uid="uid://c3x0g1051m0tq" path="res://game/characters/max_casey/character_max_casey.tscn" id="2_df11l"]
|
||||
|
||||
[node name="RoomPrototype" type="Node2D"]
|
||||
script = ExtResource("1_eii3y")
|
||||
script_name = "Prototype"
|
||||
width = 1152
|
||||
height = 648
|
||||
popochiu_placeholder = null
|
||||
|
||||
[node name="WalkableAreas" type="Node2D" parent="."]
|
||||
|
||||
[node name="Props" type="Node2D" parent="."]
|
||||
|
||||
[node name="Hotspots" type="Node2D" parent="."]
|
||||
|
||||
[node name="Regions" type="Node2D" parent="."]
|
||||
|
||||
[node name="Markers" type="Node2D" parent="."]
|
||||
|
||||
[node name="Characters" type="Node2D" parent="."]
|
||||
|
||||
[node name="CharacterMaxCasey *" parent="Characters" instance=ExtResource("2_df11l")]
|
||||
position = Vector2(44, 106)
|
23
game/rooms/prototype/room_prototype_state.gd
Normal file
23
game/rooms/prototype/room_prototype_state.gd
Normal file
|
@ -0,0 +1,23 @@
|
|||
extends PopochiuRoomData
|
||||
# Put here variables you want to save and load when saving and loading the game.
|
||||
# By default only Godot's basic built-in types are automatically saved and loaded
|
||||
# but you can use the save_custom and load_custom methods to implement your
|
||||
# own.
|
||||
# script_name and scene variables from the inherited class will not be saved.
|
||||
|
||||
|
||||
#region Virtual ####################################################################################
|
||||
# Use this to save custom data for this PopochiuRoom when saving the game.
|
||||
# The Dictionary must contain only JSON supported types: bool, int, float, String.
|
||||
func _on_save() -> Dictionary:
|
||||
return {}
|
||||
|
||||
|
||||
# Called when the game is loaded.
|
||||
# This Dictionary should has the same structure you defined for the returned
|
||||
# one in on_save().
|
||||
func _on_load(data: Dictionary) -> void:
|
||||
prints(data)
|
||||
|
||||
|
||||
#endregion
|
1
game/rooms/prototype/room_prototype_state.gd.uid
Normal file
1
game/rooms/prototype/room_prototype_state.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://bvaj3l4ms6mva
|
|
@ -0,0 +1,6 @@
|
|||
@tool
|
||||
extends PopochiuWalkableArea
|
||||
|
||||
|
||||
# ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ VIRTUAL ░░░░
|
||||
# TODO: Add useful hooks to WalkableArea (active/inactive, char walking, etc)
|
|
@ -0,0 +1 @@
|
|||
uid://s72d26v1gt0y
|
|
@ -0,0 +1,21 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://dstk4vspa36rk"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://s72d26v1gt0y" path="res://game/rooms/prototype/walkable_areas/floor/walkable_area_floor.gd" id="1_cwhs5"]
|
||||
|
||||
[sub_resource type="NavigationPolygon" id="NavigationPolygon_n6y8x"]
|
||||
vertices = PackedVector2Array(10, 10, -10, 10, -10, -10, 10, -10)
|
||||
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
|
||||
outlines = Array[PackedVector2Array]([PackedVector2Array(-10, -10, 10, -10, 10, 10, -10, 10)])
|
||||
agent_radius = 0.0
|
||||
|
||||
[node name="Floor" type="Node2D"]
|
||||
position = Vector2(576, 324)
|
||||
script = ExtResource("1_cwhs5")
|
||||
script_name = "Floor"
|
||||
description = "Floor"
|
||||
interaction_polygon = [PackedVector2Array(-10, -10, 10, -10, 10, 10, -10, 10)]
|
||||
|
||||
[node name="Perimeter" type="NavigationRegion2D" parent="."]
|
||||
visible = false
|
||||
modulate = Color(0, 1, 0, 1)
|
||||
navigation_polygon = SubResource("NavigationPolygon_n6y8x")
|
Loading…
Add table
Add a link
Reference in a new issue