This commit is contained in:
akshay 2022-08-14 19:29:25 -04:00
commit e16d192ba0
15 changed files with 2211 additions and 7 deletions

BIN
assets/dungman/DungMan.glb Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://assets/dungman/DungMan.glb" type="PackedScene" id=1]
[node name="DungMan" instance=ExtResource( 1 )]

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

@ -1,7 +1,7 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://scripts/Player.gd" type="Script" id=1]
[ext_resource path="res://assets/protodungman/DungMan.glb" type="PackedScene" id=2]
[ext_resource path="res://assets/dungman/DungMan.tscn" type="PackedScene" id=2]
[ext_resource path="res://assets/icons/stomach.png" type="Texture" id=3]
[sub_resource type="BoxShape" id=3]
@ -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.5, 0.866025, 0, -0.866025, 0.5, 0, 5.44166, 3.39746 )
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)