mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-13 07:25:06 +00:00
👽️ save state
This commit is contained in:
parent
5b20ac2f2a
commit
32a1b73cee
11 changed files with 43 additions and 53 deletions
27
modes/singleplayer/demo.gd
Normal file
27
modes/singleplayer/demo.gd
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
class_name Singleplayer extends Node
|
||||
|
||||
@onready var player_node : Player = $Player
|
||||
@onready var target_dummy : RigidBody3D = $TargetDummy
|
||||
@onready var player_respawn_location : Vector3 = player_node.position
|
||||
|
||||
func _ready() -> void:
|
||||
player_node.died.connect(respawn_player)
|
||||
player_node.match_participant_component.player_id = 1
|
||||
MapsManager.current_map = $Desert
|
||||
|
||||
func respawn_player(player : Player, _killer_id : int) -> void:
|
||||
player.respawn(player_respawn_location)
|
||||
28
modes/singleplayer/demo.tscn
Normal file
28
modes/singleplayer/demo.tscn
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://boviiugcnfyrj"]
|
||||
|
||||
[ext_resource type="Script" path="res://modes/singleplayer/demo.gd" id="1_kkjqs"]
|
||||
[ext_resource type="PackedScene" uid="uid://cbhx1xme0sb7k" path="res://entities/player/player.tscn" id="2_6wbjq"]
|
||||
[ext_resource type="PackedScene" uid="uid://dpnu1lvfncx6q" path="res://entities/target_dummy/target_dummy.tscn" id="3_fkq5v"]
|
||||
[ext_resource type="PackedScene" uid="uid://c88l3h0ph00c7" path="res://entities/flag/flag.tscn" id="4_1j2pw"]
|
||||
[ext_resource type="PackedScene" uid="uid://btlkog4b87p4x" path="res://maps/desert/desert.tscn" id="4_dogmv"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_c5jqv"]
|
||||
resource_local_to_scene = true
|
||||
bounce = 1.0
|
||||
absorbent = true
|
||||
|
||||
[node name="Demo" type="Node"]
|
||||
script = ExtResource("1_kkjqs")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("2_6wbjq")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 589.786, 209.119, 853.632)
|
||||
physics_material_override = SubResource("PhysicsMaterial_c5jqv")
|
||||
|
||||
[node name="TargetDummy" parent="." instance=ExtResource("3_fkq5v")]
|
||||
transform = Transform3D(-0.789567, 0, 0.613666, 0, 1, 0, -0.613666, 0, -0.789567, 418.132, 195.484, 802.593)
|
||||
|
||||
[node name="Flag" parent="." instance=ExtResource("4_1j2pw")]
|
||||
transform = Transform3D(0.405891, 0, -0.913922, 0, 1, 0, 0.913922, 0, 0.405891, 890.762, 179.326, 1005.33)
|
||||
|
||||
[node name="Desert" parent="." instance=ExtResource("4_dogmv")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0566101, 1456.67, 0.597462)
|
||||
Loading…
Add table
Add a link
Reference in a new issue