Add whitebox level and main scene

This commit is contained in:
Daniel Snider 2022-08-14 16:23:13 -07:00
parent b437727461
commit f1cb0ba83c
12 changed files with 1140 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@ -99,7 +99,7 @@ _global_script_class_icons={
[application]
config/name="project-dung"
run/main_scene="res://scenes/Prototype.tscn"
run/main_scene="res://scenes/main.tscn"
config/icon="res://icon.png"
[display]

18
scenes/main.tscn Normal file
View File

@ -0,0 +1,18 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://assets/moonbase_whitebox/Moonbase_Whitebox.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/main_camera.gd" type="Script" id=2]
[ext_resource path="res://scenes/player.tscn" type="PackedScene" id=3]
[node name="main" type="Spatial"]
[node name="Moonbase_Whitebox" parent="." instance=ExtResource( 1 )]
[node name="main_camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 12.6083, 0 )
current = true
script = ExtResource( 2 )
target = NodePath("../Player")
[node name="Player" parent="." instance=ExtResource( 3 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5.27448 )

View File

@ -20,6 +20,8 @@ gradient = SubResource( 4 )
fill_to = Vector2( 0, 1 )
[node name="Player" type="KinematicBody"]
axis_lock_motion_y = true
move_lock_y = true
script = ExtResource( 1 )
[node name="DungMan" parent="." instance=ExtResource( 2 )]
@ -40,10 +42,6 @@ shape = SubResource( 3 )
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0.641703, 0 )
shape = SubResource( 2 )
[node name="Camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 0.707106, 0.707106, 0, -0.707106, 0.707106, 0, 4.5, 3.5 )
fov = 50.0
[node name="UI" type="CanvasLayer" parent="."]
[node name="Control" type="Control" parent="UI"]

View File

@ -1,7 +1,7 @@
extends KinematicBody
const EPSILON = 0.0001
const SPEED = 3.0
const SPEED = 10.0
export var inventory = { "ore" : 0 }
var health: int = 4 setget set_health

7
scripts/main_camera.gd Normal file
View File

@ -0,0 +1,7 @@
extends Camera
export var target: NodePath
onready var target_node: Spatial = get_node(target)
func _process(delta):
global_transform = global_transform.looking_at(target_node.global_transform.origin, Vector3.UP)