[Minimal] Trinity-Site level z-index adjustments

This commit is contained in:
Alan Alexander Cerna 2021-11-02 23:17:20 +02:00
parent 1cca37530c
commit ef1a207c69
4 changed files with 20 additions and 11 deletions

View File

@ -27,6 +27,7 @@ window/size/height=1080
window/size/test_width=1024
window/size/test_height=600
window/stretch/mode="2d"
window/stretch/aspect="keep"
[global]

View File

@ -6,6 +6,7 @@ var player_bullet = load("res://source/entities/bullet/player_bullet.tscn")
var username_text = load("res://source/scenes/OVERLAY/elements/username_text.tscn")
var username setget username_set
var username_text_instance = null
export var debug_mode = false
var can_shoot = true
var is_reloading = false
@ -141,7 +142,7 @@ func _process(delta: float) -> void:
func _physics_process(delta) -> void:
if get_tree().has_network_peer():
if is_network_master() and visible:
look_at(get_global_mouse_position())
#look_at(get_global_mouse_position())
if "0" in VDIR:
if VDIR["1"]["0"]["ray"]["length"] - dimensions["collider"]["radius"] > 2 and jumpState == false:
gravityVector = (VDIR["1"]["0"]["ray"]["position"] - user_state["global_position"]).normalized()
@ -178,7 +179,7 @@ func _physics_process(delta) -> void:
jumpSpeed = move_toward(jumpSpeed, maxJumpSpeed, accelerationSpeed * 10)
else:
jumpState = false
jumpSpeed = 100
jumpSpeed = 300
if user_input["boost"] == true:
maxMovementSpeed = move_toward(maxMovementSpeed,120,accelerationSpeed)
else:
@ -200,6 +201,7 @@ func _physics_process(delta) -> void:
move_and_slide(puppet_velocity * movementSpeed)
func _draw():
if debug_mode == true:
for vector_type in VDIR:
var v_t = str(vector_type)
for vector in VDIR[v_t]:

View File

@ -4,6 +4,6 @@ sync func return_to_lobby():
get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn")
func _on_win_timer_timeout():
if get_tree().is_network_server():
rpc("return_to_lobby")
#func _on_win_timer_timeout():
# if get_tree().is_network_server():
# rpc("return_to_lobby")

View File

@ -25,12 +25,14 @@ script = ExtResource( 1 )
[node name="trinity_site_level_layout-level_design_z-index_-2-version_ct_f_hd_3840_2160" type="Sprite" parent="trinity_site_body"]
position = Vector2( 960, 540 )
scale = Vector2( 0.5, 0.5 )
z_index = -1
texture = ExtResource( 7 )
[node name="trinity_site_level_layout-level_design_z-index_-1-version_ct_f_hd_3840_2160" type="Sprite" parent="trinity_site_body/trinity_site_level_layout-level_design_z-index_-2-version_ct_f_hd_3840_2160"]
texture = ExtResource( 8 )
[node name="trinity_site_level_layout-level_design_z-index_0-version_ct_f_hd_3840_2160" type="Sprite" parent="trinity_site_body/trinity_site_level_layout-level_design_z-index_-2-version_ct_f_hd_3840_2160/trinity_site_level_layout-level_design_z-index_-1-version_ct_f_hd_3840_2160"]
z_index = 2
texture = ExtResource( 3 )
[node name="trinity_site_outer_collider" type="CollisionPolygon2D" parent="trinity_site_body"]
@ -43,15 +45,19 @@ polygon = PoolVector2Array( 761.5, 423.238, 765.865, 418.476, 769.04, 403.395, 7
[node name="1" type="Position2D" parent="spawn_locations"]
position = Vector2( 460, 540 )
z_index = 1
[node name="2" type="Position2D" parent="spawn_locations"]
position = Vector2( 260, 540 )
z_index = 1
[node name="3" type="Position2D" parent="spawn_locations"]
position = Vector2( 1460, 540 )
z_index = 1
[node name="4" type="Position2D" parent="spawn_locations"]
position = Vector2( 1640, 540 )
z_index = 1
[node name="UI" type="CanvasLayer" parent="."]
script = ExtResource( 2 )