👽 interstellar delivery

This commit is contained in:
anyreso 2024-10-16 21:43:01 +00:00
parent 547c97bfba
commit 97c8292858
257 changed files with 7309 additions and 4637 deletions

View file

@ -0,0 +1,35 @@
# 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 : Player = $Player
@onready var flag : Flag = $Flag
@onready var map : Node = $Desert
func _ready() -> void:
player.health.exhausted.connect(_on_player_dead)
var flagstand : Marker3D = map.get_node("FlagStand")
if flagstand:
flag.global_position = flagstand.position
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("exit"):
queue_free()
func _on_player_dead(_player : Player) -> void:
var spawns : Node = map.get_node("PlayerSpawns")
var spawn : Marker3D = spawns.get_child(
randi_range(0, spawns.get_child_count() - 1))
player.respawn(spawn.global_position)

View file

@ -0,0 +1,27 @@
[gd_scene load_steps=7 format=3 uid="uid://boviiugcnfyrj"]
[ext_resource type="Script" path="res://types/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://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"]
[ext_resource type="PackedScene" uid="uid://dpnu1lvfncx6q" path="res://entities/dummy_target/dummy_target.tscn" id="5_euor2"]
[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(-0.000506087, 0, -1, 0, 1, 0, 1, 0, -0.000506087, 612.497, 211.292, 853.632)
physics_material_override = SubResource("PhysicsMaterial_c5jqv")
[node name="Desert" parent="." instance=ExtResource("4_dogmv")]
[node name="DummyTarget" parent="." instance=ExtResource("5_euor2")]
transform = Transform3D(-0.997996, 0, -0.0632782, 0, 1, 0, 0.0632782, 0, -0.997996, 901.962, 145.367, 882.65)
[node name="Flag" parent="." instance=ExtResource("4_1j2pw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 895.356, 145.367, 888.261)