-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from GREEN-CHAOS/main
moving changes to release to trigger building
- Loading branch information
Showing
13 changed files
with
470 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
bin/ | ||
export.cfg | ||
exportpresets.cfg | ||
*.import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
[preset.0] | ||
|
||
name="Windows Desktop" | ||
platform="Windows Desktop" | ||
runnable=true | ||
custom_features="" | ||
export_filter="all_resources" | ||
include_filter="" | ||
exclude_filter="" | ||
export_path="builds/Windows.exe" | ||
script_export_mode=1 | ||
script_encryption_key="" | ||
|
||
[preset.0.options] | ||
|
||
custom_template/debug="" | ||
custom_template/release="" | ||
binary_format/64_bits=true | ||
binary_format/embed_pck=false | ||
texture_format/bptc=false | ||
texture_format/s3tc=true | ||
texture_format/etc=false | ||
texture_format/etc2=false | ||
texture_format/no_bptc_fallbacks=true | ||
codesign/enable=false | ||
codesign/identity="" | ||
codesign/password="" | ||
codesign/timestamp=true | ||
codesign/timestamp_server_url="" | ||
codesign/digest_algorithm=1 | ||
codesign/description="" | ||
codesign/custom_options=PoolStringArray( ) | ||
application/icon="" | ||
application/file_version="" | ||
application/product_version="" | ||
application/company_name="" | ||
application/product_name="" | ||
application/file_description="" | ||
application/copyright="" | ||
application/trademarks="" | ||
|
||
[preset.1] | ||
|
||
name="Linux/X11" | ||
platform="Linux/X11" | ||
runnable=true | ||
custom_features="" | ||
export_filter="all_resources" | ||
include_filter="" | ||
exclude_filter="" | ||
export_path="builds/Linux.x86_64" | ||
script_export_mode=1 | ||
script_encryption_key="" | ||
|
||
[preset.1.options] | ||
|
||
custom_template/debug="" | ||
custom_template/release="" | ||
binary_format/64_bits=true | ||
binary_format/embed_pck=false | ||
texture_format/bptc=false | ||
texture_format/s3tc=true | ||
texture_format/etc=false | ||
texture_format/etc2=false | ||
texture_format/no_bptc_fallbacks=true | ||
|
||
[preset.2] | ||
|
||
name="Mac OSX" | ||
platform="Mac OSX" | ||
runnable=true | ||
custom_features="" | ||
export_filter="all_resources" | ||
include_filter="" | ||
exclude_filter="" | ||
export_path="builds/MacOS.zip" | ||
script_export_mode=1 | ||
script_encryption_key="" | ||
|
||
[preset.2.options] | ||
|
||
custom_template/debug="" | ||
custom_template/release="" | ||
application/name="" | ||
application/info="Made with Godot Engine" | ||
application/icon="" | ||
application/identifier="" | ||
application/signature="" | ||
application/short_version="1.0" | ||
application/version="1.0" | ||
application/copyright="" | ||
display/high_res=false | ||
privacy/camera_usage_description="" | ||
privacy/microphone_usage_description="" | ||
texture_format/s3tc=true | ||
texture_format/etc=false | ||
texture_format/etc2=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[gd_scene load_steps=2 format=2] | ||
|
||
[ext_resource path="res://scripts/Player/3rdPersonCamera.gd" type="Script" id=1] | ||
|
||
[node name="PersonCamera" type="SpringArm"] | ||
transform = Transform( 1, -0.000510735, 0.000318044, 0.000510832, 1, -0.000278954, -0.00031789, 0.00027913, 1, 0, 0, 0 ) | ||
spring_length = 20.0 | ||
script = ExtResource( 1 ) | ||
|
||
[node name="Camera" type="Camera" parent="."] | ||
far = 8192.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
[gd_scene load_steps=3 format=2] | ||
|
||
[ext_resource path="res://scripts/VehicleBuilder/VehicleBuilder.gd" type="Script" id=1] | ||
[ext_resource path="res://scenes/Player/PersonCamera.tscn" type="PackedScene" id=2] | ||
|
||
[node name="Control" type="Control"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
script = ExtResource( 1 ) | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
tree = NodePath("HSplitContainer/PanelLeft/PanelLeft/Tree") | ||
root_spatial = NodePath("HSplitContainer/HSplitContainer/PanelMid/PanelTop/ViewportContainer/Viewport/Spatial") | ||
camera = NodePath("HSplitContainer/HSplitContainer/PanelMid/PanelTop/ViewportContainer/Viewport/PersonCamera") | ||
|
||
[node name="HSplitContainer" type="HSplitContainer" parent="."] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
split_offset = 500 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="PanelLeft" type="VSplitContainer" parent="HSplitContainer"] | ||
margin_right = 500.0 | ||
margin_bottom = 800.0 | ||
split_offset = 600 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="PanelLeft" type="Panel" parent="HSplitContainer/PanelLeft"] | ||
margin_right = 500.0 | ||
margin_bottom = 800.0 | ||
|
||
[node name="Tree" type="Tree" parent="HSplitContainer/PanelLeft/PanelLeft"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
drop_mode_flags = 3 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="PanelBottom" type="Panel" parent="HSplitContainer/PanelLeft"] | ||
visible = false | ||
margin_top = 612.0 | ||
margin_right = 500.0 | ||
margin_bottom = 800.0 | ||
|
||
[node name="Label2" type="Label" parent="HSplitContainer/PanelLeft/PanelBottom"] | ||
text = "Hello" | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="HSplitContainer" type="HSplitContainer" parent="HSplitContainer"] | ||
margin_left = 512.0 | ||
margin_right = 1600.0 | ||
margin_bottom = 800.0 | ||
split_offset = 700 | ||
|
||
[node name="PanelMid" type="VSplitContainer" parent="HSplitContainer/HSplitContainer"] | ||
margin_right = 700.0 | ||
margin_bottom = 800.0 | ||
split_offset = 500 | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="PanelTop" type="Panel" parent="HSplitContainer/HSplitContainer/PanelMid"] | ||
margin_right = 700.0 | ||
margin_bottom = 800.0 | ||
|
||
[node name="ViewportContainer" type="ViewportContainer" parent="HSplitContainer/HSplitContainer/PanelMid/PanelTop"] | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
stretch = true | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="Viewport" type="Viewport" parent="HSplitContainer/HSplitContainer/PanelMid/PanelTop/ViewportContainer"] | ||
size = Vector2( 700, 800 ) | ||
handle_input_locally = false | ||
render_target_update_mode = 3 | ||
|
||
[node name="Spatial" type="Spatial" parent="HSplitContainer/HSplitContainer/PanelMid/PanelTop/ViewportContainer/Viewport"] | ||
|
||
[node name="PersonCamera" parent="HSplitContainer/HSplitContainer/PanelMid/PanelTop/ViewportContainer/Viewport" instance=ExtResource( 2 )] | ||
|
||
[node name="PanelBottom" type="Panel" parent="HSplitContainer/HSplitContainer/PanelMid"] | ||
visible = false | ||
margin_top = 512.0 | ||
margin_right = 700.0 | ||
margin_bottom = 800.0 | ||
|
||
[node name="Label2" type="Label" parent="HSplitContainer/HSplitContainer/PanelMid/PanelBottom"] | ||
text = "Hello" | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} | ||
|
||
[node name="PanelRight" type="Panel" parent="HSplitContainer/HSplitContainer"] | ||
margin_left = 712.0 | ||
margin_right = 1088.0 | ||
margin_bottom = 800.0 | ||
|
||
[node name="Label" type="Label" parent="HSplitContainer/HSplitContainer/PanelRight"] | ||
margin_right = 40.0 | ||
margin_bottom = 14.0 | ||
text = "hello | ||
" | ||
__meta__ = { | ||
"_edit_use_anchors_": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
class_name PersonCamera | ||
extends SpringArm | ||
#used for 3rd as well as first person | ||
|
||
enum CameraMode { FIRST_PERSON , _3RD_PERSON = 2 } # _ is needed other wise it gets confused | ||
|
||
var scroll_speed = 0.1 #move this to CameraData | ||
|
||
var spring_length_last = spring_length | ||
var current_camera_mode = CameraMode.FIRST_PERSON | ||
|
||
|
||
|
||
func set_mode(mode): | ||
current_camera_mode = mode | ||
update_camera() | ||
|
||
func get_mode(): | ||
return current_camera_mode | ||
|
||
func change_mode(): | ||
print("change_mode") | ||
if current_camera_mode == CameraMode._3RD_PERSON: | ||
current_camera_mode = CameraMode.FIRST_PERSON | ||
else: | ||
current_camera_mode = CameraMode._3RD_PERSON | ||
update_camera() | ||
|
||
func update_camera(): | ||
if current_camera_mode == CameraMode.FIRST_PERSON: | ||
spring_length = 0 | ||
elif current_camera_mode == CameraMode._3RD_PERSON: | ||
spring_length = spring_length_last | ||
|
||
func _input_pass_through(event : InputEventMouse): | ||
|
||
if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED: | ||
if event is InputEventMouseMotion: | ||
rotation_degrees.x = clamp(rotation_degrees.x - event.relative.y*0.1,-90,90) | ||
rotation_degrees.y -= event.relative.x*0.1 | ||
else: | ||
if event.is_action_pressed("scroll_in"): | ||
spring_length -= scroll_speed | ||
elif event.is_action_pressed("scroll_out"): | ||
spring_length += scroll_speed | ||
spring_length_last = spring_length | ||
|
||
|
Oops, something went wrong.