Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var hairstyle_key = { #the first field, the bool, indicates if color is used
- 0 : [true, "short"],
- 1 : [true, "long"],
- 2 : [true, "fro"],
- 3 : [false, "none"],
- 4 : [true, "ponytail"],
- }
- ...
- func set_hair(new_hair):
- hair = new_hair
- if (hairstyle_key[hair.y])[0] == true:
- hairsprite.set_texture(load("res://img/player/hair/hair_" + hairstyle_key[hair.y][1] + "_" + hair_color_key[hair.x]))
- else:
- hairsprite.set_texture(load("res://img/player/hair/hair_" + hairstyle_key[hair.y][1]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement