Initial commit
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,62 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://cftfv7v8syhig"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c7ea7hd1t6ucj" path="res://script/ShipLogic.gd" id="1_iuibe"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3ny31fbtn7eb" path="res://test/debugCube.tscn" id="3_6dd4g"]
|
||||
[ext_resource type="Texture2D" uid="uid://cimsjl61nhh5s" path="res://assets/2D/HDR_blue_nebulae-1.hdr" id="4_fd4og"]
|
||||
[ext_resource type="Script" uid="uid://cq0sxwn7k47n6" path="res://Maps/MapGenerator/levelGenerator.gd" id="4_yoeks"]
|
||||
[ext_resource type="PackedScene" uid="uid://blc3s7fewh1t4" path="res://test/doorBlockTest.tscn" id="5_fd4og"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_2meun"]
|
||||
colors = PackedColorArray(0.047058824, 0, 0, 1, 0.6629716, 0.92782706, 0.9999992, 1)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_fd4og"]
|
||||
gradient = SubResource("Gradient_2meun")
|
||||
|
||||
[sub_resource type="PanoramaSkyMaterial" id="PanoramaSkyMaterial_yoeks"]
|
||||
panorama = ExtResource("4_fd4og")
|
||||
|
||||
[sub_resource type="Sky" id="Sky_ly181"]
|
||||
sky_material = SubResource("PanoramaSkyMaterial_yoeks")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_7qc4s"]
|
||||
background_mode = 2
|
||||
background_color = Color(1, 1, 1, 1)
|
||||
background_energy_multiplier = 3.0
|
||||
sky = SubResource("Sky_ly181")
|
||||
ambient_light_source = 3
|
||||
ambient_light_color = Color(0.23392558, 0.2339254, 0.23392549, 1)
|
||||
ambient_light_sky_contribution = 0.7
|
||||
ssr_enabled = true
|
||||
glow_enabled = true
|
||||
glow_intensity = 1.1
|
||||
adjustment_color_correction = SubResource("GradientTexture1D_fd4og")
|
||||
|
||||
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_iuibe"]
|
||||
|
||||
[node name="SpaceshipTest" type="Node3D"]
|
||||
script = ExtResource("1_iuibe")
|
||||
metadata/_custom_type_script = "uid://c7ea7hd1t6ucj"
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_7qc4s")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0445775, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
|
||||
shape = SubResource("WorldBoundaryShape3D_iuibe")
|
||||
|
||||
[node name="DebugCube" parent="." instance=ExtResource("3_6dd4g")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.733945, 0.261625)
|
||||
|
||||
[node name="DebugCube2" parent="." instance=ExtResource("3_6dd4g")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.552344, -0.0315728)
|
||||
|
||||
[node name="DebugCube3" parent="." instance=ExtResource("3_6dd4g")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.306636, -0.391098, -0.0315728)
|
||||
|
||||
[node name="LevelGenerator" type="Node3D" parent="."]
|
||||
script = ExtResource("4_yoeks")
|
||||
gridSize = 180
|
||||
doorBlock = ExtResource("5_fd4og")
|
||||
metadata/_custom_type_script = "uid://cq0sxwn7k47n6"
|
||||
@@ -0,0 +1,66 @@
|
||||
extends RefCounted
|
||||
class_name _HistoryBuffer
|
||||
|
||||
# Maps ticks (int) to arbitrary data
|
||||
var _buffer: Dictionary = {}
|
||||
|
||||
func get_snapshot(tick: int):
|
||||
if _buffer.has(tick):
|
||||
return _buffer[tick]
|
||||
else:
|
||||
return null
|
||||
|
||||
func set_snapshot(tick: int, data):
|
||||
_buffer[tick] = data
|
||||
|
||||
func get_buffer() -> Dictionary:
|
||||
return _buffer
|
||||
|
||||
func get_closest_tick(tick: int) -> int:
|
||||
if _buffer.has(tick):
|
||||
return tick
|
||||
|
||||
if _buffer.is_empty():
|
||||
return -1
|
||||
|
||||
var earliest_tick = _buffer.keys().min()
|
||||
|
||||
if tick < earliest_tick:
|
||||
return earliest_tick
|
||||
|
||||
var latest_tick = _buffer.keys().max()
|
||||
|
||||
if tick > latest_tick:
|
||||
return latest_tick
|
||||
|
||||
return _buffer.keys() \
|
||||
.filter(func (key): return key < tick) \
|
||||
.max()
|
||||
|
||||
func get_history(tick: int):
|
||||
var closest_tick = get_closest_tick(tick)
|
||||
return _buffer.get(closest_tick)
|
||||
|
||||
func trim(earliest_tick_to_keep: int):
|
||||
var ticks := _buffer.keys()
|
||||
for tick in ticks:
|
||||
if tick < earliest_tick_to_keep:
|
||||
_buffer.erase(tick)
|
||||
|
||||
func clear():
|
||||
_buffer.clear()
|
||||
|
||||
func size() -> int:
|
||||
return _buffer.size()
|
||||
|
||||
func is_empty() -> bool:
|
||||
return _buffer.is_empty()
|
||||
|
||||
func has(tick) -> bool:
|
||||
return _buffer.has(tick)
|
||||
|
||||
func ticks() -> Array:
|
||||
return _buffer.keys()
|
||||
|
||||
func erase(tick):
|
||||
_buffer.erase(tick)
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>libGodotFmod.macos.template_release</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.utopiarise.fmod-gdextension</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>libGodotFmod.macos.template_release</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.12</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user