forked from team-sg/hero-mark-2
changed sg sprite to work better with palettes
This commit is contained in:
parent
463b7952b1
commit
a5f4c34236
34 changed files with 356 additions and 9 deletions
|
@ -54,6 +54,9 @@ onready var pushable_detector: RayCast2D = $"%PushableDetector"
|
|||
|
||||
# OVERRIDES #
|
||||
func _ready() -> void:
|
||||
#set palette
|
||||
var palette = load("res://graphics/player/palettes/%s.png" % Game.current_palette)
|
||||
sprite.material.set_shader_param("palette", palette)
|
||||
# death handling
|
||||
Game.respawn_point = global_position
|
||||
connect("died", Game, "_on_player_died")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=43 format=2]
|
||||
|
||||
[ext_resource path="res://objects/player/player.gd" type="Script" id=1]
|
||||
[ext_resource path="res://graphics/player/pal_purplearmor.png" type="Texture" id=2]
|
||||
[ext_resource path="res://graphics/player/palettes/default.png" type="Texture" id=2]
|
||||
[ext_resource path="res://shaders/recolor_border.shader" type="Shader" id=3]
|
||||
[ext_resource path="res://graphics/player/sg_idle.png" type="Texture" id=4]
|
||||
[ext_resource path="res://addons/godot_state_charts/parallel_state.gd" type="Script" id=5]
|
||||
|
@ -1174,8 +1174,8 @@ script = ExtResource( 8 )
|
|||
[connection signal="state_physics_processing" from="StateChart/Root/Movement" to="." method="_process_movement"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded" to="." method="_on_Grounded_state_entered"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded" to="." method="_process_grounded"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_can_walk"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_horizontal_movement_grounded"]
|
||||
[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_can_walk"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Still" to="." method="_on_Still_state_entered"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Walking" to="." method="_on_Walking_state_entered"]
|
||||
[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/CanWalk/Blinking" to="." method="_on_Blinking_state_entered"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue