diff --git a/audio/sounds/explosion_large_01_n.wav b/audio/sounds/explosion_large_01_n.wav new file mode 100644 index 0000000..41afd4b Binary files /dev/null and b/audio/sounds/explosion_large_01_n.wav differ diff --git a/audio/sounds/explosion_large_01_n.wav.import b/audio/sounds/explosion_large_01_n.wav.import new file mode 100644 index 0000000..0b314dd --- /dev/null +++ b/audio/sounds/explosion_large_01_n.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cw0mfvl76lpxq" +path="res://.godot/imported/explosion_large_01_n.wav-0f4fe3d8d9d02bb99f06e621d264e4e7.sample" + +[deps] + +source_file="res://audio/sounds/explosion_large_01_n.wav" +dest_files=["res://.godot/imported/explosion_large_01_n.wav-0f4fe3d8d9d02bb99f06e621d264e4e7.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/models/default_mesh.res b/models/default_mesh.res index a66e6b7..403f129 100644 Binary files a/models/default_mesh.res and b/models/default_mesh.res differ diff --git a/scenes/test_level.tscn b/scenes/test_level.tscn index 3bec372..882fa55 100644 --- a/scenes/test_level.tscn +++ b/scenes/test_level.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=7 format=3 uid="uid://by6suwmds7xq2"] +[gd_scene load_steps=6 format=3 uid="uid://by6suwmds7xq2"] [ext_resource type="Script" uid="uid://d3t381vws7vns" path="res://scripts/test_level.gd" id="1_qcd3b"] [ext_resource type="PackedScene" uid="uid://bgocskbofewsr" path="res://templates/HUD.tscn" id="1_x4b8f"] [ext_resource type="Script" uid="uid://cymi1n4gavixy" path="res://scripts/level_camera.gd" id="3_qcd3b"] -[ext_resource type="PackedScene" uid="uid://eaw46gqf17aw" path="res://templates/explosion.tscn" id="6_qcd3b"] [ext_resource type="MeshLibrary" uid="uid://bhpyvhf36jl0f" path="res://testing.tres" id="7_88ety"] [ext_resource type="MeshLibrary" uid="uid://cvhm40o2uw5mr" path="res://testing markers.tres" id="7_ahbqi"] @@ -32,6 +31,7 @@ unique_name_in_owner = true mesh_library = ExtResource("7_88ety") cell_size = Vector3(1, 1, 1) cell_center_y = false +collision_mask = 3 data = { "cells": PackedInt32Array(17, 6, 1441793, 17, 5, 1441793, 17, 4, 1441793, 17, 3, 1441793, 17, 2, 1441793, 17, 1, 1441793, 17, 0, 1441793, 17, 65535, 1441793, 17, 65534, 1441793, 17, 65533, 1441793, 17, 65532, 1441793, 17, 65531, 1441793, 17, 65530, 1441793, 17, 65529, 1441793, 17, 65528, 1441793, 17, 65527, 1441793, 17, 65526, 1441793, 17, 65525, 1441793, -8, 65525, 1441793, -8, 65526, 1441793, -8, 65527, 1441793, -8, 65528, 1441793, -8, 65529, 1441793, -8, 65530, 1441793, -8, 65531, 1441793, -8, 65532, 1441793, -8, 65533, 1441793, -8, 65534, 1441793, -8, 65535, 1441793, -8, 0, 1441793, -8, 1, 1441793, -8, 2, 1441793, -8, 3, 1441793, -8, 4, 1441793, -8, 5, 1441793, -8, 6, 1441793, -7, 65525, 1441793, -7, 65526, 1441793, -7, 65527, 1441793, -7, 65528, 1441793, -7, 65529, 1441793, -7, 65530, 1441793, -7, 65531, 1441793, -7, 65532, 1441793, -7, 65533, 1441793, -7, 65534, 1441793, -7, 65535, 1441793, -7, 0, 1441793, -7, 1, 1441793, -7, 2, 1441793, -7, 3, 1441793, -7, 4, 1441793, -7, 5, 1441793, -7, 6, 1441793, -6, 65525, 1441793, -6, 65526, 1441793, -6, 65527, 1441793, -6, 65528, 1441793, -6, 65529, 1441793, -6, 65530, 1441793, -6, 65531, 1441793, -6, 65532, 1441793, -6, 65533, 1441793, -6, 65534, 1441793, -6, 65535, 1441793, -6, 0, 1441793, -6, 1, 1441793, -6, 2, 1441793, -6, 3, 1441793, -6, 4, 1441793, -6, 5, 1441793, -6, 6, 1441793, -5, 65525, 1441793, -5, 65526, 1441793, -5, 65527, 1441793, -5, 65528, 1441793, -5, 65529, 1441793, -5, 65530, 1441793, -5, 65531, 1441793, -5, 65532, 1441793, -5, 65533, 1441793, -5, 65534, 1441793, -5, 65535, 1441793, -5, 0, 1441793, -5, 1, 1441793, -5, 2, 1441793, -5, 3, 1441793, -5, 4, 1441793, -5, 5, 1441793, -5, 6, 1441793, -4, 65525, 1441793, -4, 65526, 1441793, -4, 65527, 1441793, -4, 65528, 1441793, -4, 65529, 1441793, -4, 65530, 1441793, -4, 65531, 1441793, -4, 65532, 1441793, -4, 65533, 1441793, -4, 65534, 1441793, -4, 65535, 1441793, -4, 0, 1441793, -4, 1, 1441793, -4, 2, 1441793, -4, 3, 1441793, -4, 4, 1441793, -4, 5, 1441793, -4, 6, 1441793, -3, 65525, 1441793, -3, 65526, 1441793, -3, 65527, 1441793, -3, 65528, 1441793, -3, 65529, 1441793, -3, 65530, 1441793, -3, 65531, 1441793, -3, 65532, 1441793, -3, 65533, 1441793, -3, 65534, 1441793, -3, 65535, 1441793, -3, 0, 1441793, -3, 1, 1441793, -3, 2, 1441793, -3, 3, 1441793, -3, 4, 1441793, -3, 5, 1441793, -3, 6, 1441793, -2, 65525, 1441793, -2, 65526, 1441793, -2, 65527, 1441793, -2, 65528, 1441793, -2, 65529, 1441793, -2, 65530, 1441793, -2, 65531, 1441793, -2, 65532, 1441793, -2, 65533, 1441793, -2, 65534, 1441793, -2, 65535, 1441793, -2, 0, 1441793, -2, 1, 1441793, -2, 2, 1441793, -2, 3, 1441793, -2, 4, 1441793, -2, 5, 1441793, -2, 6, 1441793, -1, 65525, 1441793, -1, 65526, 1441793, -1, 65527, 1441793, -1, 65528, 1441793, -1, 65529, 1441793, -1, 65530, 1441793, -1, 65531, 1441793, -1, 65532, 1441793, -1, 65533, 1441793, -1, 65534, 1441793, -1, 65535, 1441793, -1, 0, 1441793, -1, 1, 1441793, -1, 2, 1441793, -1, 3, 1441793, -1, 4, 1441793, -1, 5, 1441793, -1, 6, 1441793, -65536, 65525, 1441793, -65536, 65526, 1441793, -65536, 65527, 1441793, -65536, 65528, 1441793, -65536, 65529, 1441793, -65536, 65530, 1441793, -65536, 65531, 1441793, -65536, 65532, 1441793, -65536, 65533, 1441793, -65536, 65534, 1441793, -65536, 65535, 1441793, -65536, 0, 1441793, -65536, 1, 1441793, -65536, 2, 1441793, -65536, 3, 1441793, -65536, 4, 1441793, -65536, 5, 1441793, -65536, 6, 1441793, -65535, 65525, 1441793, -65535, 65526, 1441793, -65535, 65527, 1441793, -65535, 65528, 1441793, -65535, 65529, 1441793, -65535, 65530, 1441793, -65535, 65531, 1441793, -65535, 65532, 1441793, -65535, 65533, 1441793, -65535, 65534, 1441793, -65535, 65535, 1441793, -65535, 0, 1441793, -65535, 1, 1441793, -65535, 2, 1441793, -65535, 3, 1441793, -65535, 4, 1441793, -65535, 5, 1441793, -65535, 6, 1441793, -65534, 65525, 1441793, -65534, 65526, 1441793, -65534, 65527, 1441793, -65534, 65528, 1441793, -65534, 65529, 1441793, -65534, 65530, 1441793, -65534, 65531, 1441793, -65534, 65532, 1441793, -65534, 65533, 1441793, -65534, 65534, 1441793, -65534, 65535, 1441793, -65534, 0, 1441793, -65534, 1, 1441793, -65534, 2, 1441793, -65534, 3, 1441793, -65534, 4, 1441793, -65534, 5, 1441793, -65534, 6, 1441793, -65533, 65525, 1441793, -65533, 65526, 1441793, -65533, 65527, 1441793, -65533, 65528, 1441793, -65533, 65529, 1441793, -65533, 65530, 1441793, -65533, 65531, 1441793, -65533, 65532, 1441793, -65533, 65533, 1441793, -65533, 65534, 1441793, -65533, 0, 1441793, -65533, 1, 1441793, -65533, 2, 1441793, -65533, 3, 1441793, -65533, 4, 1441793, -65533, 5, 1441793, -65533, 6, 1441793, -65532, 65525, 1441793, -65532, 65526, 1441793, -65532, 65527, 1441793, -65532, 65528, 1441793, -65532, 65529, 1441793, -65532, 65530, 1441793, -65532, 65531, 1441793, -65532, 65532, 1441793, -65532, 65533, 1441793, -65532, 65535, 1441793, -65532, 0, 1441793, -65532, 1, 1441793, -65532, 2, 1441793, -65532, 3, 1441793, -65532, 4, 1441793, -65532, 5, 1441793, -65532, 6, 1441793, -65531, 65525, 1441793, -65531, 65526, 1441793, -65531, 65527, 1441793, -65531, 65528, 1441793, -65531, 65529, 1441793, -65531, 65530, 1441793, -65531, 65531, 1441793, -65531, 65532, 1441793, -65531, 65533, 1441793, -65531, 65534, 1441793, -65531, 65535, 1441793, -65531, 0, 1441793, -65531, 1, 1441793, -65531, 2, 1441793, -65531, 3, 1441793, -65531, 4, 1441793, -65531, 5, 1441793, -65531, 6, 1441793, -65530, 65525, 1441793, -65530, 65526, 1441793, -65530, 65527, 1441793, -65530, 65528, 1441793, -65530, 65529, 1441793, -65530, 65530, 1441793, -65530, 65531, 1441793, -65530, 65532, 1441793, -65530, 65533, 1441793, -65530, 65534, 1441793, -65530, 65535, 1441793, -65530, 0, 1441793, -65530, 1, 1441793, -65530, 2, 1441793, -65530, 3, 1441793, -65530, 4, 1441793, -65530, 5, 1441793, -65530, 6, 1441793, -65529, 65525, 1441793, -65529, 65526, 1441793, -65529, 65527, 1441793, -65529, 65528, 1441793, -65529, 65529, 1441793, -65529, 65530, 1441793, -65529, 65531, 1441793, -65529, 65532, 1441793, -65529, 65533, 1441793, -65529, 65534, 1441793, -65529, 65535, 1441793, -65529, 0, 1441793, -65529, 1, 1441793, -65529, 2, 1441793, -65529, 3, 1441793, -65529, 4, 1441793, -65529, 5, 1441793, -65529, 6, 1441793, -65528, 65525, 1441793, -65528, 65526, 1441793, -65528, 65527, 1441793, -65528, 65528, 1441793, -65528, 65529, 1441793, -65528, 65530, 1441793, -65528, 65531, 1441793, -65528, 65532, 1441793, -65528, 65533, 1441793, -65528, 65534, 1441793, -65528, 65535, 1441793, -65528, 0, 1441793, -65528, 1, 1441793, -65528, 2, 1441793, -65528, 3, 1441793, -65528, 4, 1441793, -65528, 5, 1441793, -65528, 6, 1441793, -65527, 65525, 1441793, -65527, 65526, 1441793, -65527, 65527, 1441793, -65527, 65528, 1441793, -65527, 65529, 1441793, -65527, 65530, 1441793, -65527, 65531, 1441793, -65527, 65532, 1441793, -65527, 65533, 1441793, -65527, 65534, 1441793, -65527, 65535, 1441793, -65527, 0, 1441793, -65527, 1, 1441793, -65527, 2, 1441793, -65527, 3, 1441793, -65527, 4, 1441793, -65527, 5, 1441793, -65527, 6, 1441793, -65526, 65525, 1441793, -65526, 65526, 1441793, -65526, 65527, 1441793, -65526, 65528, 1441793, -65526, 65529, 1441793, -65526, 65530, 1441793, -65526, 65531, 1441793, -65526, 65532, 1441793, -65526, 65533, 1441793, -65526, 65534, 1441793, -65526, 65535, 1441793, -65526, 0, 1441793, -65526, 1, 1441793, -65526, 2, 1441793, -65526, 3, 1441793, -65526, 4, 1441793, -65526, 5, 1441793, -65526, 6, 1441793, -65525, 65525, 1441793, -65525, 65526, 1441793, -65525, 65527, 1441793, -65525, 65528, 1441793, -65525, 65529, 1441793, -65525, 65530, 1441793, -65525, 65531, 1441793, -65525, 65532, 1441793, -65525, 65533, 1441793, -65525, 65534, 1441793, -65525, 65535, 1441793, -65525, 0, 1441793, -65525, 1, 1441793, -65525, 4, 1441793, -65525, 5, 1441793, -65525, 6, 1441793, -65524, 65525, 1441793, -65524, 65526, 1441793, -65524, 65527, 1441793, -65524, 65528, 1441793, -65524, 65529, 1441793, -65524, 65530, 1441793, -65524, 65531, 1441793, -65524, 65532, 1441793, -65524, 65533, 1441793, -65524, 65534, 1441793, -65524, 65535, 1441793, -65524, 0, 1441793, -65524, 1, 1441793, -65524, 2, 1441793, -65524, 3, 1441793, -65524, 4, 1441793, -65524, 5, 1441793, -65524, 6, 1441793, -65523, 65525, 1441793, -65523, 65526, 1441793, -65523, 65527, 1441793, -65523, 65528, 1441793, -65523, 65529, 1441793, -65523, 65530, 1441793, -65523, 65531, 1441793, -65523, 65532, 1441793, -65523, 65533, 1441793, -65523, 65534, 1441793, -65523, 65535, 1441793, -65523, 0, 1441793, -65523, 1, 1441793, -65523, 2, 1441793, -65523, 3, 1441793, -65523, 4, 1441793, -65523, 5, 1441793, -65523, 6, 1441793, -65522, 65525, 1441793, -65522, 65526, 1441793, -65522, 65527, 1441793, -65522, 65528, 1441793, -65522, 65529, 1441793, -65522, 65530, 1441793, -65522, 65531, 1441793, -65522, 65532, 1441793, -65522, 65533, 1441793, -65522, 65534, 1441793, -65522, 65535, 1441793, -65522, 0, 1441793, -65522, 1, 1441793, -65522, 2, 1441793, -65522, 3, 1441793, -65522, 4, 1441793, -65522, 5, 1441793, -65522, 6, 1441793, -65521, 65525, 1441793, -65521, 65526, 1441793, -65521, 65527, 1441793, -65521, 65528, 1441793, -65521, 65529, 1441793, -65521, 65530, 1441793, -65521, 65531, 1441793, -65521, 65532, 1441793, -65521, 65533, 1441793, -65521, 65534, 1441793, -65521, 65535, 1441793, -65521, 0, 1441793, -65521, 1, 1441793, -65521, 2, 1441793, -65521, 3, 1441793, -65521, 4, 1441793, -65521, 5, 1441793, -65521, 6, 1441793, -65520, 65525, 1441793, -65520, 65526, 1441793, -65520, 65527, 1441793, -65520, 65528, 1441793, -65520, 65529, 1441793, -65520, 65530, 1441793, -65520, 65531, 1441793, -65520, 65532, 1441793, -65520, 65533, 1441793, -65520, 65534, 1441793, -65520, 65535, 1441793, -65520, 0, 1441793, -65520, 1, 1441793, -65520, 2, 1441793, -65520, 3, 1441793, -65520, 4, 1441793, -65520, 5, 1441793, -65520, 6, 1441793, 12, 65525, 1441793, 12, 65526, 1441793, 12, 65527, 1441793, 12, 65528, 1441793, 12, 65529, 1441793, 12, 65530, 1441793, 12, 65531, 1441793, 12, 65532, 1441793, 12, 65533, 1441793, 12, 65534, 1441793, 12, 65535, 1441793, 12, 0, 1441793, 12, 1, 1441793, 12, 2, 1441793, 12, 3, 1441793, 12, 4, 1441793, 12, 5, 1441793, 12, 6, 1441793, 13, 65525, 1441793, 13, 65526, 1441793, 13, 65527, 1441793, 13, 65528, 1441793, 13, 65529, 1441793, 13, 65530, 1441793, 13, 65531, 1441793, 13, 65532, 1441793, 13, 65533, 1441793, 13, 65534, 1441793, 13, 65535, 1441793, 13, 0, 1441793, 13, 1, 1441793, 13, 2, 1441793, 13, 3, 1441793, 13, 4, 1441793, 13, 5, 1441793, 13, 6, 1441793, 14, 65525, 1441793, 14, 65526, 1441793, 14, 65527, 1441793, 14, 65528, 1441793, 14, 65529, 1441793, 14, 65530, 1441793, 14, 65531, 1441793, 14, 65532, 1441793, 14, 65533, 1441793, 14, 65534, 1441793, 14, 65535, 1441793, 14, 0, 1441793, 14, 1, 1441793, 14, 2, 1441793, 14, 3, 1441793, 14, 4, 1441793, 14, 5, 1441793, 14, 6, 1441793, 15, 65525, 1441793, 15, 65526, 1441793, 15, 65527, 1441793, 15, 65528, 1441793, 15, 65529, 1441793, 15, 65530, 1441793, 15, 65531, 1441793, 15, 65532, 1441793, 15, 65533, 1441793, 15, 65534, 1441793, 15, 65535, 1441793, 15, 0, 1441793, 15, 1, 1441793, 15, 2, 1441793, 15, 3, 1441793, 15, 4, 1441793, 15, 5, 1441793, 15, 6, 1441793, 16, 65525, 1441793, 16, 65526, 1441793, 16, 65527, 1441793, 16, 65528, 1441793, 16, 65529, 1441793, 16, 65530, 1441793, 16, 65531, 1441793, 16, 65532, 1441793, 16, 65533, 1441793, 16, 65534, 1441793, 16, 65535, 1441793, 16, 0, 1441793, 16, 1, 1441793, 16, 2, 1441793, 16, 3, 1441793, 16, 4, 1441793, 16, 5, 1441793, 16, 6, 1441793, 65548, 65525, 1441793, 65548, 65526, 1441793, 65548, 65527, 1441793, 65548, 65528, 1441793, 65548, 65529, 1441793, 65548, 65530, 1441793, 65548, 65531, 1441793, 65548, 65532, 1441793, 65548, 65533, 1441793, 65548, 65534, 1441793, 65548, 65535, 1441793, 65548, 0, 1441793, 65548, 1, 1441793, 65548, 2, 1441793, 65548, 3, 1441793, 65548, 4, 1441793, 65548, 5, 1441793, 65548, 6, 1441793, 65549, 65525, 1441793, 65549, 65526, 1441793, 65549, 65527, 1441793, 65549, 65528, 1441793, 65549, 65529, 1441793, 65549, 65530, 1441793, 65549, 65531, 1441793, 65549, 65532, 1441793, 65549, 65533, 1441793, 65549, 65534, 1441793, 65549, 65535, 1441793, 65549, 0, 1441793, 65549, 1, 1441793, 65549, 2, 1441793, 65549, 3, 1441793, 65549, 4, 1441793, 65549, 5, 1441793, 65549, 6, 1441793, 65550, 65525, 1441793, 65550, 65526, 1441793, 65550, 65527, 1441793, 65550, 65528, 1441793, 65550, 65529, 1441793, 65550, 65530, 1441793, 65550, 65531, 1441793, 65550, 65532, 1441793, 65550, 65533, 1441793, 65550, 65534, 1441793, 65550, 65535, 1441793, 65550, 0, 1441793, 65550, 1, 1441793, 65550, 2, 1441793, 65550, 3, 1441793, 65550, 4, 1441793, 65550, 5, 1441793, 65550, 6, 1441793, 65551, 65525, 1441793, 65551, 65526, 1441793, 65551, 65527, 1441793, 65551, 65528, 1441793, 65551, 65529, 1441793, 65551, 65530, 1441793, 65551, 65531, 1441793, 65551, 65532, 1441793, 65551, 65533, 1441793, 65551, 65534, 1441793, 65551, 65535, 1441793, 65551, 0, 1441793, 65551, 1, 1441793, 65551, 2, 1441793, 65551, 3, 1441793, 65551, 4, 1441793, 65551, 5, 1441793, 65551, 6, 1441793, 65552, 65525, 1441793, 65552, 65526, 1441793, 65552, 65527, 1441793, 65552, 65528, 1441793, 65552, 65529, 1441793, 65552, 65530, 1441793, 65552, 65531, 1441793, 65552, 65532, 1441793, 65552, 65533, 1441793, 65552, 65534, 1441793, 65552, 65535, 1441793, 65552, 0, 1441793, 65552, 1, 1441793, 65552, 2, 1441793, 65552, 3, 1441793, 65552, 4, 1441793, 65552, 5, 1441793, 65552, 6, 1441793, 65553, 65525, 1441793, 65553, 65526, 1441793, 65553, 65527, 1441793, 65553, 65528, 1441793, 65553, 65529, 1441793, 65553, 65530, 1441793, 65553, 65531, 1441793, 65553, 65532, 1441793, 65553, 65533, 1441793, 65553, 65534, 1441793, 65553, 65535, 1441793, 65553, 0, 1441793, 65553, 1, 1441793, 65553, 2, 1441793, 65553, 3, 1441793, 65553, 4, 1441793, 65553, 5, 1441793, 65553, 6, 1441793, -65532, 65534, 1441793, -65533, 65535, 1441793, -65525, 2, 1441793, -65525, 3, 1441793, 11, 65525, 1441793, 10, 65525, 1441793, 9, 65525, 1441793, 8, 65525, 1441793, 7, 65525, 1441793, 6, 65525, 1441793, 5, 65525, 1441793, 4, 65525, 1441793, 3, 65525, 1441793, 2, 65525, 1441793, 1, 65525, 1441793, 0, 65525, 1441793, 0, 65524, 1441793, 65535, 65524, 1441793, 65534, 65524, 1441793, 65533, 65524, 1441793, 65532, 65524, 1441793, 65535, 65525, 1441793, 65534, 65525, 1441793, 65533, 65525, 1441793, 65532, 65525, 1441793, 65531, 65525, 1441793, 65530, 65525, 1441793, 65530, 65524, 1441793, 65529, 65524, 1441793, 65528, 65524, 1441793, 65528, 65525, 1441793, 65529, 65525, 1441793, 65528, 65526, 1441793, 65529, 65526, 1441793, 65530, 65526, 1441793, 65531, 65526, 1441793, 65532, 65526, 1441793, 65533, 65526, 1441793, 65534, 65526, 1441793, 65535, 65526, 1441793, 0, 65526, 1441793, 1, 65526, 1441793, 2, 65526, 1441793, 3, 65526, 1441793, 4, 65526, 1441793, 5, 65526, 1441793, 6, 65526, 1441793, 7, 65526, 1441793, 7, 65527, 1441793, 8, 65527, 1441793, 9, 65527, 1441793, 10, 65527, 1441793, 11, 65527, 1441793, 11, 65526, 1441793, 8, 65526, 1441793, 9, 65526, 1441793, 10, 65526, 1441793, 6, 65527, 1441793, 5, 65527, 1441793, 4, 65527, 1441793, 3, 65527, 1441793, 2, 65527, 1441793, 1, 65527, 1441793, 0, 65527, 1441793, 65535, 65527, 1441793, 65534, 65527, 1441793, 65533, 65527, 1441793, 65532, 65527, 1441793, 65531, 65527, 1441793, 65530, 65527, 1441793, 65529, 65527, 1441793, 65527, 65527, 1441793, 65528, 65527, 1441793, 65528, 65528, 1441793, 65529, 65528, 1441793, 65530, 65528, 1441793, 65531, 65528, 1441793, 65532, 65528, 1441793, 65533, 65528, 1441793, 65534, 65528, 1441793, 65535, 65528, 1441793, 0, 65528, 1441793, 1, 65528, 1441793, 2, 65528, 1441793, 3, 65528, 1441793, 4, 65528, 1441793, 5, 65528, 1441793, 6, 65528, 1441793, 7, 65528, 1441793, 8, 65528, 1441793, 9, 65528, 1441793, 10, 65528, 1441793, 11, 65528, 1441793) } @@ -41,6 +41,7 @@ metadata/_editor_floor_ = Vector3(0, 0, 0) mesh_library = ExtResource("7_88ety") cell_size = Vector3(1, 1, 1) cell_center_y = false +collision_mask = 3 data = { "cells": PackedInt32Array(65528, 65524, 1441793, 65529, 65524, 1441793, 65530, 65524, 1441793, 65531, 65524, 1441793, 65532, 65524, 1441793, 65533, 65524, 1441793, 65534, 65524, 1441793, 65535, 65524, 1441793, 0, 65524, 1441793, 1, 65524, 1441793, 2, 65524, 1441793, 3, 65524, 1441793, 4, 65524, 1441793, 5, 65524, 1441793, 6, 65524, 1441793, 7, 65524, 1441793, 8, 65524, 1441793, 9, 65524, 1441793, 10, 65524, 1441793, 11, 65524, 1441793, 12, 65524, 1441793, 13, 65524, 1441793, 14, 65524, 1441793, 15, 65524, 1441793, 16, 65524, 1441793, 17, 65524, 1441793, 18, 65524, 1441793, 18, 65525, 1441793, 18, 65526, 1441793, 18, 65527, 1441793, 18, 65528, 1441793, 18, 65529, 1441793, 18, 65530, 1441793, 18, 65531, 1441793, 18, 65532, 1441793, 18, 65533, 1441793, 18, 65534, 1441793, 18, 65535, 1441793, 18, 0, 1441793, 18, 1, 1441793, 18, 2, 1441793, 18, 3, 1441793, 18, 4, 1441793, 18, 5, 1441793, 18, 6, 1441793, 65529, 7, 1441793, 65530, 7, 1441793, 65531, 7, 1441793, 65532, 7, 1441793, 65533, 7, 1441793, 65534, 7, 1441793, 65535, 7, 1441793, 0, 7, 1441793, 1, 7, 1441793, 2, 7, 1441793, 3, 7, 1441793, 4, 7, 1441793, 5, 7, 1441793, 6, 7, 1441793, 7, 7, 1441793, 8, 7, 1441793, 9, 7, 1441793, 10, 7, 1441793, 11, 7, 1441793, 12, 7, 1441793, 13, 7, 1441793, 14, 7, 1441793, 15, 7, 1441793, 16, 7, 1441793, 17, 7, 1441793, 18, 7, 1441793, 65527, 7, 1441793, 65528, 7, 1441793, 65527, 65532, 1441793, 65527, 65533, 1441793, 65527, 65534, 1441793, 65527, 65535, 1441793, 65527, 0, 1441793, 65527, 1, 1441793, 65527, 2, 1441793, 65527, 3, 1441793, 65527, 4, 1441793, 65527, 5, 1441793, 65527, 6, 1441793, 65527, 65524, 1441793, 65527, 65525, 1441793, 65527, 65526, 1441793, 65527, 65527, 1441793, 65527, 65528, 1441793, 65527, 65529, 1441793, 65527, 65530, 1441793, 65527, 65531, 1441793, 131063, 65524, 1441793, 131064, 65524, 1441793, 131065, 65524, 1441793, 131066, 65524, 1441793, 131067, 65524, 1441793, 131068, 65524, 1441793, 131069, 65524, 1441793, 131070, 65524, 1441793, 131071, 65524, 1441793, 65536, 65524, 1441793, 65537, 65524, 1441793, 65538, 65524, 1441793, 65539, 65524, 1441793, 65540, 65524, 1441793, 65541, 65524, 1441793, 65542, 65524, 1441793, 65543, 65524, 1441793, 65544, 65524, 1441793, 65545, 65524, 1441793, 65546, 65524, 1441793, 65547, 65524, 1441793, 65548, 65524, 1441793, 65549, 65524, 1441793, 65550, 65524, 1441793, 65551, 65524, 1441793, 65552, 65524, 1441793, 65553, 65524, 1441793, 65554, 65524, 1441793, 131063, 65525, 1441793, 131063, 65526, 1441793, 131063, 65527, 1441793, 131063, 65528, 1441793, 131063, 65529, 1441793, 131063, 65530, 1441793, 131063, 65531, 1441793, 131063, 65532, 1441793, 131063, 65533, 1441793, 131063, 65534, 1441793, 131063, 65535, 1441793, 131063, 0, 1441793, 131063, 1, 1441793, 131063, 2, 1441793, 131063, 3, 1441793, 131063, 4, 1441793, 131063, 5, 1441793, 131063, 6, 1441793, 131063, 7, 1441793, 131064, 7, 1441793, 131065, 7, 1441793, 131066, 7, 1441793, 131067, 7, 1441793, 131068, 7, 1441793, 131069, 7, 1441793, 131070, 7, 1441793, 131071, 7, 1441793, 65536, 7, 1441793, 65537, 7, 1441793, 65538, 7, 1441793, 65539, 7, 1441793, 65540, 7, 1441793, 65541, 7, 1441793, 65542, 7, 1441793, 65543, 7, 1441793, 65544, 7, 1441793, 65545, 7, 1441793, 65546, 7, 1441793, 65547, 7, 1441793, 65548, 7, 1441793, 65549, 7, 1441793, 65550, 7, 1441793, 65551, 7, 1441793, 65552, 7, 1441793, 65553, 7, 1441793, 65554, 7, 1441793, 65554, 65525, 1441793, 65554, 65526, 1441793, 65554, 65527, 1441793, 65554, 65528, 1441793, 65554, 65529, 1441793, 65554, 65530, 1441793, 65554, 65531, 1441793, 65554, 65532, 1441793, 65554, 65533, 1441793, 65554, 65534, 1441793, 65554, 65535, 1441793, 65554, 0, 1441793, 65554, 1, 1441793, 65554, 2, 1441793, 65554, 3, 1441793, 65554, 4, 1441793, 65554, 5, 1441793, 65554, 6, 1441793, 196599, 7, 1441793, 196600, 7, 1441793, 196601, 7, 1441793, 196602, 7, 1441793, 196603, 7, 1441793, 196604, 7, 1441793, 196605, 7, 1441793, 196606, 7, 1441793, 196607, 7, 1441793, 131072, 7, 1441793, 131073, 7, 1441793, 131074, 7, 1441793, 131075, 7, 1441793, 131076, 7, 1441793, 131077, 7, 1441793, 131078, 7, 1441793, 131079, 7, 1441793, 131080, 7, 1441793, 131081, 7, 1441793, 131082, 7, 1441793, 131083, 7, 1441793, 131084, 7, 1441793, 131085, 7, 1441793, 131086, 7, 1441793, 131087, 7, 1441793, 131088, 7, 1441793, 131089, 7, 1441793, 131090, 7, 1441793, 131090, 65524, 1441793, 131090, 65525, 1441793, 131090, 65526, 1441793, 131090, 65527, 1441793, 131090, 65528, 1441793, 131090, 65529, 1441793, 131090, 65530, 1441793, 131090, 65531, 1441793, 131090, 65532, 1441793, 131090, 65533, 1441793, 131090, 65534, 1441793, 131090, 65535, 1441793, 131090, 0, 1441793, 131090, 1, 1441793, 131090, 2, 1441793, 131090, 3, 1441793, 131090, 4, 1441793, 131090, 5, 1441793, 131090, 6, 1441793, 196599, 65524, 1441793, 196600, 65524, 1441793, 196601, 65524, 1441793, 196602, 65524, 1441793, 196603, 65524, 1441793, 196604, 65524, 1441793, 196605, 65524, 1441793, 196606, 65524, 1441793, 196607, 65524, 1441793, 131072, 65524, 1441793, 131073, 65524, 1441793, 131074, 65524, 1441793, 131075, 65524, 1441793, 131076, 65524, 1441793, 131077, 65524, 1441793, 131078, 65524, 1441793, 131079, 65524, 1441793, 131080, 65524, 1441793, 131081, 65524, 1441793, 131082, 65524, 1441793, 131083, 65524, 1441793, 131084, 65524, 1441793, 131085, 65524, 1441793, 131086, 65524, 1441793, 131087, 65524, 1441793, 131088, 65524, 1441793, 131089, 65524, 1441793, 196599, 65525, 1441793, 196599, 65526, 1441793, 196599, 65527, 1441793, 196599, 65528, 1441793, 196599, 65529, 1441793, 196599, 65530, 1441793, 196599, 65531, 1441793, 196599, 65532, 1441793, 196599, 65533, 1441793, 196599, 65534, 1441793, 196599, 65535, 1441793, 196599, 0, 1441793, 196599, 1, 1441793, 196599, 2, 1441793, 196599, 3, 1441793, 196599, 4, 1441793, 196599, 5, 1441793, 196599, 6, 1441793, 262135, 7, 1441793, 262136, 7, 1441793, 262137, 7, 1441793, 262138, 7, 1441793, 262139, 7, 1441793, 262140, 7, 1441793, 262141, 7, 1441793, 262142, 7, 1441793, 262143, 7, 1441793, 196608, 7, 1441793, 196609, 7, 1441793, 196610, 7, 1441793, 196611, 7, 1441793, 196612, 7, 1441793, 196613, 7, 1441793, 196614, 7, 1441793, 196615, 7, 1441793, 196616, 7, 1441793, 196617, 7, 1441793, 196618, 7, 1441793, 196619, 7, 1441793, 196620, 7, 1441793, 196621, 7, 1441793, 196622, 7, 1441793, 196623, 7, 1441793, 196624, 7, 1441793, 196625, 7, 1441793, 196626, 7, 1441793, 262135, 65524, 1441793, 262135, 65525, 1441793, 262135, 65526, 1441793, 262135, 65527, 1441793, 262135, 65528, 1441793, 262135, 65529, 1441793, 262135, 65530, 1441793, 262135, 65531, 1441793, 262135, 65532, 1441793, 262135, 65533, 1441793, 262135, 65534, 1441793, 262135, 65535, 1441793, 262135, 0, 1441793, 262135, 1, 1441793, 262135, 2, 1441793, 262135, 3, 1441793, 262135, 4, 1441793, 262135, 5, 1441793, 262135, 6, 1441793, 262136, 65524, 1441793, 262137, 65524, 1441793, 262138, 65524, 1441793, 262139, 65524, 1441793, 262140, 65524, 1441793, 262141, 65524, 1441793, 262142, 65524, 1441793, 262143, 65524, 1441793, 196608, 65524, 1441793, 196609, 65524, 1441793, 196610, 65524, 1441793, 196611, 65524, 1441793, 196612, 65524, 1441793, 196613, 65524, 1441793, 196614, 65524, 1441793, 196615, 65524, 1441793, 196616, 65524, 1441793, 196617, 65524, 1441793, 196618, 65524, 1441793, 196619, 65524, 1441793, 196620, 65524, 1441793, 196621, 65524, 1441793, 196622, 65524, 1441793, 196623, 65524, 1441793, 196624, 65524, 1441793, 196625, 65524, 1441793, 196626, 65524, 1441793, 196626, 65525, 1441793, 196626, 65526, 1441793, 196626, 65527, 1441793, 196626, 65528, 1441793, 196626, 65529, 1441793, 196626, 65530, 1441793, 196626, 65531, 1441793, 196626, 65532, 1441793, 196626, 65533, 1441793, 196626, 65534, 1441793, 196626, 65535, 1441793, 196626, 0, 1441793, 196626, 1, 1441793, 196626, 2, 1441793, 196626, 3, 1441793, 196626, 4, 1441793, 196626, 5, 1441793, 196626, 6, 1441793, 10, 3, 1441792, 10, 2, 1441792, 65547, 3, 1441792, 65547, 2, 1441792, 65547, 65527, 1441792, 65547, 65526, 1441792, 65528, 65529, 0, 65529, 65529, 0) } @@ -52,13 +53,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.02, 0) mesh_library = ExtResource("7_ahbqi") cell_size = Vector3(1, 1, 1) cell_center_y = false +collision_layer = 0 +collision_mask = 0 metadata/_editor_floor_ = Vector3(0, -1, 0) - -[node name="Explosion4" parent="." instance=ExtResource("6_qcd3b")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.4760416, 0, 1.06534) - -[node name="Explosion5" parent="." instance=ExtResource("6_qcd3b")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.4470272, 0, 0.15185928) - -[node name="Explosion6" parent="." instance=ExtResource("6_qcd3b")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.4994788, 0, -0.94687414) diff --git a/scripts/disarm_trap_modal.gd b/scripts/disarm_trap_modal.gd index a2ae19b..819ca5f 100644 --- a/scripts/disarm_trap_modal.gd +++ b/scripts/disarm_trap_modal.gd @@ -47,9 +47,8 @@ var disarming : bool var difficulty : int = 1 - func _process(delta: float) -> void: - timer_label.text = "%02d.3" % timer.time_left + timer_label.text = "%02f.3" % timer.time_left func start_disarming() -> void: disarming = true diff --git a/scripts/healthbar.gd b/scripts/healthbar.gd new file mode 100644 index 0000000..7bd37c2 --- /dev/null +++ b/scripts/healthbar.gd @@ -0,0 +1,15 @@ +class_name HealthBar extends TextureProgressBar + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + +func _on_health_changed(current : int, max : int) -> void: + max_value = max + value = current diff --git a/scripts/healthbar.gd.uid b/scripts/healthbar.gd.uid new file mode 100644 index 0000000..3c4c946 --- /dev/null +++ b/scripts/healthbar.gd.uid @@ -0,0 +1 @@ +uid://bolw6n14ocxt3 diff --git a/scripts/hud.gd b/scripts/hud.gd index 2a228ac..9b8c395 100644 --- a/scripts/hud.gd +++ b/scripts/hud.gd @@ -1,11 +1,12 @@ class_name HUD extends Control @onready var trap_display : TrapDisplay = %TrapDisplay - +@onready var p1_healthbar : HealthBar = %P1HealthBar func _ready() -> void: Game.hud = self func register_player(player : Player) -> void: + player.health_changed.connect(p1_healthbar._on_health_changed) trap_display._on_trap_list_changed(player.data.traps, player.data.active_trap) player.trap_cycled.connect(trap_display._on_trap_cycled) player.trap_quantity_changed.connect(trap_display._on_trap_quantity_changed) diff --git a/scripts/player.gd b/scripts/player.gd index a76aa56..efe5b80 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -9,6 +9,8 @@ const disarm_trap_modal = preload("res://templates/disarm_trap_modal.tscn") @onready var data : PlayerData = $Data @onready var trap_sound : AudioStreamPlayer3D = $TrapSound +var id : int = 1 + var button_actions : Dictionary[int, String] var current_square : Vector3i var detecting : bool = false @@ -22,7 +24,7 @@ var modal = null signal trap_cycled(trap_index) signal trap_quantity_changed(trap_index, quantity) signal trap_list_changed(traps) - +signal health_changed(current : int, max : int) func _physics_process(delta: float) -> void: var dir = Input.get_vector("west", "east", "north", "south") @@ -156,6 +158,9 @@ func show_disarm_trap_modal() -> void: modal = disarm_trap_modal.instantiate() modal.difficulty = Game.level.difficulty modal.square = current_square + var trap = Game.level.traps[current_square] + trap.disarming = true + trap.disarm_id = Multiplayer.id Game.level.add_child(modal) func start_detecting() -> void: @@ -216,6 +221,10 @@ func cycle_active_trap(dir) -> void: if prev != data.active_trap: trap_cycled.emit(data.active_trap) +func hurt(damage : int) -> void: + data.life = max(0, data.life - damage) + health_changed.emit(data.life, data.max_life) + func _on_trap_disarmed(type : Trap.Type) -> void: for i in range(len(data.traps)): var d = data.traps[i] diff --git a/scripts/test_level.gd b/scripts/test_level.gd index 9bf601f..c0c1703 100644 --- a/scripts/test_level.gd +++ b/scripts/test_level.gd @@ -59,6 +59,10 @@ func is_valid_trap_square(crd : Vector3i) -> bool: return false return true +func add_vfx(vfx, crd : Vector3i) -> void: + vfx.global_position = Vector3(crd) #+ Vector3(0.5, 0, 0.5) + add_child(vfx) + func activate_trap(crd : Vector3i) -> void: var trap = traps[crd] #if trap: diff --git a/scripts/trap.gd b/scripts/trap.gd index 0c85bde..27f8623 100644 --- a/scripts/trap.gd +++ b/scripts/trap.gd @@ -9,6 +9,14 @@ enum Type{ PITFALL } +const range_shapes : Dictionary = { + Trap.Type.BOMB : Vector3(5,1,5), + Trap.Type.GAS : Vector3(1,1,1), + Trap.Type.PITFALL : Vector3(1,1,1), + Trap.Type.FORCE_PANEL : Vector3(1,1,1), + Trap.Type.SWITCH : Vector3(3,1,3), + Trap.Type.MINE : Vector3(5,1,5), +} const trap_icons : Dictionary = { Trap.Type.BOMB : preload("res://visuals/images/icons/t-bomb.png"), Trap.Type.GAS : preload("res://visuals/images/icons/t-gas.png"), @@ -18,6 +26,10 @@ const trap_icons : Dictionary = { Trap.Type.MINE : preload("res://visuals/images/icons/t-mine.png"), } +const explosion_template = preload("res://templates/explosion.tscn") + +@onready var range_area : Area3D = %RangeArea +@onready var range_shape : BoxShape3D = %RangeShape.shape @onready var model : MeshInstance3D = %Model @onready var icon : Sprite3D = %Icon @onready var material : StandardMaterial3D = model.get_surface_override_material(0) @@ -25,6 +37,12 @@ const trap_icons : Dictionary = { var type : Type var square : Vector3i var trap_owner : int + +var disarming : bool +var disarm_id : int + +var damage : int = 10 + signal disarmed(type : Trap.Type) @@ -51,4 +69,17 @@ func _ready() -> void: icon.texture = trap_icons[type] model.visible = owns_trap icon.visible = owns_trap + range_shape.size = range_shapes[type] material.albedo_color = Color.YELLOW if owns_trap else Color.RED + +func activate() -> void: + var exp = explosion_template.instantiate() + Game.level.add_vfx(exp, square) + for body in range_area.get_overlapping_bodies(): + body.hurt(damage) + #match(type): + +func _on_body_entered(body: Node3D) -> void: + if !disarming or body.id != disarm_id: + if !body.detecting: + activate() diff --git a/scripts/trap_fx.gd b/scripts/trap_fx.gd index 9ae1e52..8197dd5 100644 --- a/scripts/trap_fx.gd +++ b/scripts/trap_fx.gd @@ -9,3 +9,12 @@ func _ready() -> void: func _on_timer_timeout() -> void: print("Done") queue_free() + +func proximal_shake(distance : float) -> void: + print(Input.get_connected_joypads()) + if !Game.player: + return + var d = global_position.distance_squared_to(Game.player.global_position) + if d <= distance * distance: + Input.start_joy_vibration(0, 1,1,1000) + diff --git a/templates/HUD.tscn b/templates/HUD.tscn index 42d6563..484b841 100644 --- a/templates/HUD.tscn +++ b/templates/HUD.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=30 format=3 uid="uid://bgocskbofewsr"] +[gd_scene load_steps=31 format=3 uid="uid://bgocskbofewsr"] [ext_resource type="Script" uid="uid://bm50jiya4s3ei" path="res://scripts/hud.gd" id="1_jiiqi"] [ext_resource type="Texture2D" uid="uid://dri0a20l6kpbj" path="res://visuals/images/icon.svg" id="1_k5de2"] @@ -11,6 +11,7 @@ [ext_resource type="Texture2D" uid="uid://btjn353r1qg1q" path="res://visuals/images/icons/player 2 tag.png" id="3_k0acs"] [ext_resource type="Texture2D" uid="uid://urh11huy67cs" path="res://visuals/materials/health gradient.tres" id="3_vhta5"] [ext_resource type="PackedScene" uid="uid://xk323c0ta2b" path="res://templates/trap_icon.tscn" id="4_aopqe"] +[ext_resource type="Script" uid="uid://bolw6n14ocxt3" path="res://scripts/healthbar.gd" id="4_iv5le"] [ext_resource type="Texture2D" uid="uid://bcv3f38cib5xk" path="res://visuals/images/icons/mine.png" id="4_l86lr"] [ext_resource type="Texture2D" uid="uid://cyuylbs0o72xk" path="res://visuals/images/icons/pitfall.png" id="5_aopqe"] [ext_resource type="Texture2D" uid="uid://hiwrcar5fnyk" path="res://visuals/images/icons/switch.png" id="6_e7ody"] @@ -79,12 +80,14 @@ theme_override_constants/separation = 2 layout_mode = 2 texture = ExtResource("2_yda1o") -[node name="ProgressBar" type="TextureProgressBar" parent="Control/PanelContainer/HBoxContainer/VBoxContainer2/PanelContainer/VBoxContainer"] +[node name="P1HealthBar" type="TextureProgressBar" parent="Control/PanelContainer/HBoxContainer/VBoxContainer2/PanelContainer/VBoxContainer"] +unique_name_in_owner = true custom_minimum_size = Vector2(0, 50) layout_mode = 2 value = 100.0 nine_patch_stretch = true -texture_over = ExtResource("3_vhta5") +texture_progress = ExtResource("3_vhta5") +script = ExtResource("4_iv5le") [node name="PanelContainer2" type="PanelContainer" parent="Control/PanelContainer/HBoxContainer/VBoxContainer2"] custom_minimum_size = Vector2(250, 100) @@ -98,12 +101,12 @@ theme_override_constants/separation = 2 layout_mode = 2 texture = ExtResource("3_k0acs") -[node name="ProgressBar" type="TextureProgressBar" parent="Control/PanelContainer/HBoxContainer/VBoxContainer2/PanelContainer2/VBoxContainer"] +[node name="P2HealthBar" type="TextureProgressBar" parent="Control/PanelContainer/HBoxContainer/VBoxContainer2/PanelContainer2/VBoxContainer"] custom_minimum_size = Vector2(0, 50) layout_mode = 2 value = 100.0 nine_patch_stretch = true -texture_over = ExtResource("3_vhta5") +texture_progress = ExtResource("3_vhta5") [node name="VBoxContainer" type="VBoxContainer" parent="Control/PanelContainer/HBoxContainer"] custom_minimum_size = Vector2(150, 0) diff --git a/templates/explosion.tscn b/templates/explosion.tscn index 02c7a35..f42e402 100644 --- a/templates/explosion.tscn +++ b/templates/explosion.tscn @@ -157,7 +157,6 @@ size = Vector2(0.25, 1) center_offset = Vector3(0, 0.4, 0) [sub_resource type="Animation" id="Animation_d5gho"] -length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -168,7 +167,7 @@ tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [false] +"values": [true] } tracks/1/type = "value" tracks/1/imported = false @@ -177,10 +176,10 @@ tracks/1/path = NodePath("StreakFX:emitting") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), +"times": PackedFloat32Array(0, 0.033333335), +"transitions": PackedFloat32Array(1, 1), "update": 1, -"values": [false] +"values": [false, true] } tracks/2/type = "value" tracks/2/imported = false @@ -189,10 +188,10 @@ tracks/2/path = NodePath("OmniLight3D:light_energy") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), +"times": PackedFloat32Array(0, 0.06666667), +"transitions": PackedFloat32Array(1, 1), "update": 0, -"values": [20.0] +"values": [20.0, 0.0] } [sub_resource type="Animation" id="Animation_gf6ds"] @@ -234,6 +233,20 @@ tracks/2/keys = { "update": 0, "values": [20.0, 0.0] } +tracks/3/type = "method" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath(".") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [3.0], +"method": &"proximal_shake" +}] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_p88g7"] _data = { @@ -258,7 +271,6 @@ draw_pass_1 = SubResource("SphereMesh_4y8np") [node name="ParticleFX" type="GPUParticles3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.4375714, 0, 0.5602956) material_override = ExtResource("2_l2v4y") -emitting = false amount = 10 lifetime = 0.6 one_shot = true diff --git a/templates/singleplayer_pc.tscn b/templates/singleplayer_pc.tscn index d5a0a02..b007db3 100644 --- a/templates/singleplayer_pc.tscn +++ b/templates/singleplayer_pc.tscn @@ -16,6 +16,8 @@ height = 1.0 [node name="Player" type="CharacterBody3D"] physics_interpolation_mode = 1 +collision_layer = 2 +collision_mask = 5 floor_constant_speed = true floor_max_angle = 0.93549645 floor_snap_length = 1.0 diff --git a/templates/trap.tscn b/templates/trap.tscn index 3fba576..f8a74a9 100644 --- a/templates/trap.tscn +++ b/templates/trap.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://bk3yqawritfnj"] +[gd_scene load_steps=8 format=3 uid="uid://bk3yqawritfnj"] [ext_resource type="Script" uid="uid://yjsgte3x7jjw" path="res://scripts/trap.gd" id="1_6h4aj"] [ext_resource type="ArrayMesh" uid="uid://bih57xe642hrc" path="res://models/trap.obj" id="2_oj6ox"] @@ -14,7 +14,12 @@ albedo_color = Color(1, 1, 0, 1) [sub_resource type="BoxShape3D" id="BoxShape3D_dw7u0"] size = Vector3(0.8, 1, 0.8) +[sub_resource type="BoxShape3D" id="BoxShape3D_6h4aj"] +resource_local_to_scene = true + [node name="Trap" type="Area3D"] +collision_layer = 4 +collision_mask = 2 script = ExtResource("1_6h4aj") [node name="Model" type="MeshInstance3D" parent="."] @@ -40,4 +45,14 @@ texture = ExtResource("3_mxvh5") [node name="RevealTimer" type="Timer" parent="."] unique_name_in_owner = true +[node name="RangeArea" type="Area3D" parent="."] +unique_name_in_owner = true +collision_layer = 0 +collision_mask = 2 + +[node name="RangeShape" type="CollisionShape3D" parent="RangeArea"] +unique_name_in_owner = true +shape = SubResource("BoxShape3D_6h4aj") + +[connection signal="body_entered" from="." to="." method="_on_body_entered"] [connection signal="timeout" from="RevealTimer" to="." method="_on_reveal_timeout"]