adds collision to spawned monsters, moves player position 3 units back
This commit is contained in:
parent
f025f89401
commit
e8f06e7b99
12 changed files with 251 additions and 121 deletions
|
|
@ -1,9 +1,17 @@
|
|||
[gd_scene load_steps=15 format=3 uid="uid://p8agd0dfam0p"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://p8agd0dfam0p"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://be5bc5gjbo875" path="res://scenes/player.tscn" id="1_ra6oo"]
|
||||
[ext_resource type="PackedScene" uid="uid://tyjgdu65yj3m" path="res://assets/models/round_bat/round_bat_skin.tscn" id="2_lks2w"]
|
||||
[ext_resource type="PackedScene" uid="uid://dawpmu4vvv3rs" path="res://scenes/monster_spawnpoint.tscn" id="3_esgto"]
|
||||
[ext_resource type="PackedScene" uid="uid://cytaswycabcel" path="res://scenes/monster.tscn" id="4_bpsqy"]
|
||||
[ext_resource type="Script" path="res://resources/monster_stats.gd" id="3_iktqp"]
|
||||
[ext_resource type="Resource" uid="uid://ym438vedcdyl" path="res://resources/DebugMonster1.tres" id="4_3y7gi"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_wak6a"]
|
||||
size = Vector2(1000, 1000)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8wti1"]
|
||||
albedo_color = Color(0.157906, 0.300646, 0.191269, 1)
|
||||
|
||||
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_m4bnl"]
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_g80j5"]
|
||||
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
|
||||
|
|
@ -18,28 +26,23 @@ sky = SubResource("Sky_wlahx")
|
|||
tonemap_mode = 2
|
||||
glow_enabled = true
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_wak6a"]
|
||||
size = Vector2(1000, 1000)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8wti1"]
|
||||
albedo_color = Color(0.157906, 0.300646, 0.191269, 1)
|
||||
|
||||
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_m4bnl"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_5i27t"]
|
||||
size = Vector3(2, 2, 2)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xmo7q"]
|
||||
size = Vector3(2, 2, 2)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_h1buf"]
|
||||
size = Vector3(2, 5, 2)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_522pk"]
|
||||
size = Vector3(2, 5, 2)
|
||||
|
||||
[node name="DebugLevel" type="Node3D"]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_ra6oo")]
|
||||
|
||||
[node name="Floor" type="StaticBody3D" parent="."]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="FloorMesh" type="MeshInstance3D" parent="Floor"]
|
||||
mesh = SubResource("PlaneMesh_wak6a")
|
||||
skeleton = NodePath("../..")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_8wti1")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor"]
|
||||
shape = SubResource("WorldBoundaryShape3D_m4bnl")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(0.224144, 0.474445, -0.851271, 0.12941, 0.851271, 0.508518, 0.965926, -0.224144, 0.129409, 0, 0, 0)
|
||||
shadow_enabled = true
|
||||
|
|
@ -47,45 +50,8 @@ shadow_enabled = true
|
|||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_rwve8")
|
||||
|
||||
[node name="Floor" type="StaticBody3D" parent="."]
|
||||
|
||||
[node name="FloorMesh" type="MeshInstance3D" parent="Floor"]
|
||||
mesh = SubResource("PlaneMesh_wak6a")
|
||||
skeleton = NodePath("../..")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_8wti1")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor"]
|
||||
shape = SubResource("WorldBoundaryShape3D_m4bnl")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_ra6oo")]
|
||||
|
||||
[node name="DebugCube" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -10)
|
||||
|
||||
[node name="CubeMesh" type="MeshInstance3D" parent="DebugCube"]
|
||||
mesh = SubResource("BoxMesh_5i27t")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="DebugCube"]
|
||||
shape = SubResource("BoxShape3D_xmo7q")
|
||||
|
||||
[node name="DebugCube2" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.03764, 1, -10)
|
||||
|
||||
[node name="CubeMesh" type="MeshInstance3D" parent="DebugCube2"]
|
||||
mesh = SubResource("BoxMesh_h1buf")
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="DebugCube2"]
|
||||
shape = SubResource("BoxShape3D_522pk")
|
||||
|
||||
[node name="Monster" type="Node3D" parent="."]
|
||||
transform = Transform3D(0.886107, 0, 0.463482, 0, 1, 0, -0.463482, 0, 0.886107, -2, 0, -4)
|
||||
|
||||
[node name="RoundBatSkin" parent="Monster" instance=ExtResource("2_lks2w")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
script = null
|
||||
|
||||
[node name="MonsterSpawnpoint" parent="." instance=ExtResource("3_esgto")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, -10)
|
||||
spawnable_monsters = Array[PackedScene]([ExtResource("4_bpsqy")])
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -12)
|
||||
spawnable_monsters = Array[ExtResource("3_iktqp")]([ExtResource("4_3y7gi")])
|
||||
ignore_visibility = true
|
||||
max_monsters = 1
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://cswuap81n7t3f"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cswuap81n7t3f"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b6ylra30qxf30" path="res://assets/logo/logo.png" id="1_fpt28"]
|
||||
[ext_resource type="PackedScene" uid="uid://p8agd0dfam0p" path="res://scenes/debug_level.tscn" id="1_j851n"]
|
||||
[ext_resource type="Script" path="res://scripts/inventory.gd" id="2_0mkyf"]
|
||||
[ext_resource type="FontFile" uid="uid://dmc6dygxrekja" path="res://assets/fonts/BreatheFireIii-PKLOB.ttf" id="2_vjast"]
|
||||
[ext_resource type="Script" path="res://scripts/joystick.gd" id="4_6b5cb"]
|
||||
[ext_resource type="Texture2D" uid="uid://8anyvhkcy4ng" path="res://assets/textures/Xbox Series/Vector/xbox_button_a.svg" id="5_pwhwh"]
|
||||
|
|
@ -16,9 +17,50 @@
|
|||
[node name="DebugLevel" parent="CurrentLevel" instance=ExtResource("1_j851n")]
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
visible = false
|
||||
|
||||
[node name="Inventory" type="Control" parent="CanvasLayer"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
grow_horizontal = 2
|
||||
script = ExtResource("2_0mkyf")
|
||||
|
||||
[node name="MonsterList" type="VBoxContainer" parent="CanvasLayer/Inventory"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -137.0
|
||||
offset_bottom = 40.0
|
||||
grow_horizontal = 0
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="Monster1" type="Label" parent="CanvasLayer/Inventory/MonsterList"]
|
||||
layout_mode = 2
|
||||
text = "Monster 1: empty"
|
||||
|
||||
[node name="Monster2" type="Label" parent="CanvasLayer/Inventory/MonsterList"]
|
||||
layout_mode = 2
|
||||
text = "Monster 2: empty"
|
||||
|
||||
[node name="Monster3" type="Label" parent="CanvasLayer/Inventory/MonsterList"]
|
||||
layout_mode = 2
|
||||
text = "Monster 3: empty"
|
||||
|
||||
[node name="Monster4" type="Label" parent="CanvasLayer/Inventory/MonsterList"]
|
||||
layout_mode = 2
|
||||
text = "Monster 4: empty"
|
||||
|
||||
[node name="Monster5" type="Label" parent="CanvasLayer/Inventory/MonsterList"]
|
||||
layout_mode = 2
|
||||
text = "Monster 5: empty"
|
||||
|
||||
[node name="Monster6" type="Label" parent="CanvasLayer/Inventory/MonsterList"]
|
||||
layout_mode = 2
|
||||
text = "Monster 6: empty"
|
||||
|
||||
[node name="MainMenu" type="Control" parent="CanvasLayer"]
|
||||
visible = false
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
|
|
|||
|
|
@ -1,8 +1,22 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cytaswycabcel"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cytaswycabcel"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/monster.gd" id="1_13xtk"]
|
||||
[ext_resource type="Resource" uid="uid://ym438vedcdyl" path="res://resources/DebugMonster1.tres" id="2_rjclr"]
|
||||
[ext_resource type="Material" uid="uid://ctul3e67rcq23" path="res://materials/CollisionDebugMaterial.tres" id="3_k6auu"]
|
||||
|
||||
[node name="Monster" type="Node3D"]
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_tjvna"]
|
||||
radius = 0.4
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_aou7a"]
|
||||
radius = 0.4
|
||||
height = 0.8
|
||||
|
||||
[node name="Monster" type="CharacterBody3D"]
|
||||
script = ExtResource("1_13xtk")
|
||||
monster_stats = ExtResource("2_rjclr")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("SphereShape3D_tjvna")
|
||||
|
||||
[node name="CollisionVisualizer" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("SphereMesh_aou7a")
|
||||
skeleton = NodePath("")
|
||||
surface_material_override/0 = ExtResource("3_k6auu")
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://dawpmu4vvv3rs"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dawpmu4vvv3rs"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/monster_spawnpoint.gd" id="1_eyon3"]
|
||||
[ext_resource type="Script" path="res://resources/monster_stats.gd" id="2_u38vv"]
|
||||
[ext_resource type="Resource" uid="uid://ym438vedcdyl" path="res://resources/DebugMonster1.tres" id="3_4axng"]
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_phb77"]
|
||||
radius = 0.4
|
||||
|
|
@ -16,10 +14,17 @@ roughness = 0.25
|
|||
|
||||
[node name="MonsterSpawnpoint" type="Node3D"]
|
||||
script = ExtResource("1_eyon3")
|
||||
spawnable_monsters = Array[ExtResource("2_u38vv")]([ExtResource("3_4axng")])
|
||||
|
||||
[node name="Diamond" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
mesh = SubResource("SphereMesh_phb77")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_kvc2a")
|
||||
|
||||
[node name="VisibleOnScreenNotifier3D" type="VisibleOnScreenNotifier3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0)
|
||||
billboard = 1
|
||||
text = "0 / 5"
|
||||
font_size = 64
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue