mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-08-02 04:23:49 +00:00
treadmill shader fix
previously when adjusting the value of the shader, it would change the value for all shaders. now it duplicates the shader at runtime so it's a unique copy and can have it's own unique shhader value
This commit is contained in:
parent
5f476210ff
commit
8c9c34f33a
4 changed files with 39 additions and 10 deletions
|
|
@ -8,10 +8,14 @@ export var editor_move := 0 setget _set_editor_move
|
|||
|
||||
var node_sprite : Sprite
|
||||
|
||||
|
||||
func _ready():
|
||||
# editor and game code
|
||||
node_sprite = $Sprite
|
||||
node_sprite.material = node_sprite.material.duplicate(true)
|
||||
#node_sprite.material = node_sprite.get_material().duplicate(true)
|
||||
#node_sprite.set_material(node_sprite.get_material().duplicate(true))
|
||||
print(node_sprite.material)
|
||||
|
||||
_set_tread_speed(tread_speed)
|
||||
_set_length(length)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue