feat: add player character script with movement, state, and multiplayer synchronization.
This commit is contained in:
+3
-2
@@ -723,6 +723,7 @@ func _refresh_player_visuals():
|
||||
color_to_apply = Color(1.0, 0.5, 0.5) # Attack Mode (Red Tint)
|
||||
elif is_carrying_tekton or is_knock_mode:
|
||||
color_to_apply = Color(1.0, 1.0, 0.0) # Carrying or Knocking (Yellow)
|
||||
alpha_to_apply = 0.5 # 50% opacity when carrying Tekton
|
||||
elif immunity_timer > 0:
|
||||
color_to_apply = Color(0.5, 1.0, 0.5) # Immunity (Light Green)
|
||||
elif is_invisible:
|
||||
@@ -754,8 +755,8 @@ func update_rank_visuals(rank: int):
|
||||
func _apply_tint_recursive(node: Node, color: Color, alpha: float = 1.0):
|
||||
if node is MeshInstance3D:
|
||||
var mat = StandardMaterial3D.new()
|
||||
mat.albedo_color = color
|
||||
mat.albedo_color.a = alpha
|
||||
mat.albedo_color = Color(color.r, color.g, color.b, alpha)
|
||||
mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
|
||||
mat.blend_mode = BaseMaterial3D.BLEND_MODE_MIX
|
||||
mat.cull_mode = BaseMaterial3D.CULL_DISABLED
|
||||
mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
|
||||
|
||||
Reference in New Issue
Block a user