mirror of
https://github.com/kristoferssolo/FuncIt.git
synced 2025-10-21 19:30:35 +00:00
[Temp] Particle fix
This commit is contained in:
parent
331c7fe2d0
commit
27fe4c951f
@ -6,6 +6,7 @@ var state = false
|
||||
var activeAnimation = "idle"
|
||||
var playingLoop = true
|
||||
|
||||
# warning-ignore:unused_argument
|
||||
func _process(delta):
|
||||
if reacted == true:
|
||||
playingLoop = false
|
||||
|
||||
@ -86,12 +86,12 @@ var weaponAngle = 0
|
||||
|
||||
var particleTexture = ImageTexture.new()
|
||||
var particleImage = Image.new()
|
||||
var activeTheme = null
|
||||
|
||||
var globalActivePhase = null
|
||||
var clientPhase = null
|
||||
|
||||
func _ready():
|
||||
|
||||
weaponPositionalOffset = Vector2(-$"weaponHolder/Player-character-theme-gun-na3".texture.get_width() * $"weaponHolder/Player-character-theme-gun-na3".scale.x / 2,-$"weaponHolder/Player-character-theme-gun-na3".texture.get_height() * $"weaponHolder/Player-character-theme-gun-na3".scale.y / 2) + Vector2(-$weaponHolder.get_shape().get_radius(), 0)
|
||||
$"weaponHolder/Player-character-theme-gun".position = weaponPositionalOffset
|
||||
# warning-ignore:return_value_discarded
|
||||
@ -162,9 +162,10 @@ func _process(_delta: float) -> void:
|
||||
clientPhase = puppet_phase
|
||||
Global.set_current_phase(clientPhase)
|
||||
$"weaponHolder/Player-character-theme-gun".play(theme)
|
||||
#particleImage.load("res://source/assets/sprites/character/player/theme/" + theme + "/na/Player-character-theme-particle-"+theme+".png")
|
||||
#particleTexture.create_from_image(particleImage)
|
||||
#$Particles2D.texture = particleTexture
|
||||
if theme != activeTheme:
|
||||
particleImage.load("res://source/assets/sprites/character/player/theme/"+ theme +"/na/Player-character-theme-particle-"+ theme +".png")
|
||||
particleTexture.create_from_image(particleImage)
|
||||
$Particles2D.texture = particleTexture
|
||||
if username_text_instance != null:
|
||||
username_text_instance.name = "username" + name
|
||||
if $Particles2D.position.x > 0 and direction != "left":
|
||||
|
||||
@ -9,8 +9,10 @@ func _ready() -> void:
|
||||
username_text_edit.call_deferred("grab_focus")
|
||||
|
||||
|
||||
# warning-ignore:unused_argument
|
||||
func _process(delta) -> void:
|
||||
if Input.is_action_just_pressed("esc"):
|
||||
# warning-ignore:return_value_discarded
|
||||
get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn")
|
||||
|
||||
func _on_confirm_pressed():
|
||||
@ -34,9 +36,11 @@ sync func switch_to_game() -> void:
|
||||
if child.is_in_group("Player"):
|
||||
child.update_shoot_mode(true)
|
||||
|
||||
# warning-ignore:return_value_discarded
|
||||
get_tree().change_scene("res://source/levels/trinity_site/trinity_site_level_playground.tscn")
|
||||
|
||||
|
||||
func _on_return_pressed():
|
||||
# warning-ignore:return_value_discarded
|
||||
get_tree().change_scene("res://source/scenes/GUI/main_menu.tscn")
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ var current_player_location_instance_number = null
|
||||
var globalActivePhase = null
|
||||
|
||||
func _ready() -> void:
|
||||
# warning-ignore:return_value_discarded
|
||||
get_tree().connect("network_peer_disconnected", self, "_player_disconnected")
|
||||
if get_tree().is_network_server():
|
||||
setup_player_positions()
|
||||
|
||||
@ -51,6 +51,7 @@ func _physics_process(delta):
|
||||
if ray["interacted"]:
|
||||
liftSpeed += -ray["end"].normalized().y * maxSpeed
|
||||
liftSpeed = clamp(liftSpeed, -maxSpeed, maxSpeed)
|
||||
# warning-ignore:return_value_discarded
|
||||
move_and_slide(Vector2(0,liftSpeed))
|
||||
if Mode == 0:
|
||||
$ts_bot_sprite.play("passive_idle")
|
||||
|
||||
@ -4,9 +4,11 @@ extends TextureButton
|
||||
func _process(_delta) -> void:
|
||||
if get_tree().get_current_scene().get_name() == "network_setup":
|
||||
if Input.is_action_just_pressed("esc") and get_tree().get_current_scene().get_child(2).get_children() == [] and not get_tree().get_current_scene().get_child(1).is_visible_in_tree():
|
||||
# warning-ignore:return_value_discarded
|
||||
Global.instance_node(load("res://source/scenes/OVERLAY/elements/menu_button_overlay.tscn"), Global.ui)
|
||||
else:
|
||||
if Input.is_action_just_pressed("esc") and get_tree().get_current_scene().get_child(2).get_children() == []:
|
||||
# warning-ignore:return_value_discarded
|
||||
Global.instance_node(load("res://source/scenes/OVERLAY/elements/menu_button_overlay.tscn"), Global.ui)
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user