diff options
author | tpart <tpart120@proton.me> | 2024-06-25 22:16:46 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-06-25 22:16:46 +0200 |
commit | 00e811ea2408931f328778101886d54b47444f0b (patch) | |
tree | 476d7ffe8d43c56ca21c5d6661a4cca7067297d4 | |
parent | 4b9b0b6692c8fd4c395cb57cdb74b19aef7d53d9 (diff) | |
download | hurrycurry-00e811ea2408931f328778101886d54b47444f0b.tar hurrycurry-00e811ea2408931f328778101886d54b47444f0b.tar.bz2 hurrycurry-00e811ea2408931f328778101886d54b47444f0b.tar.zst |
Add additional blond hairstyle
-rw-r--r-- | client/player/character/character.gd | 13 | ||||
-rw-r--r-- | client/player/character/character.tscn | 9 | ||||
-rw-r--r-- | client/player/character/hair_2.res | bin | 0 -> 16312 bytes |
3 files changed, 21 insertions, 1 deletions
diff --git a/client/player/character/character.gd b/client/player/character/character.gd index 76e7b6b3..8f694e9e 100644 --- a/client/player/character/character.gd +++ b/client/player/character/character.gd @@ -29,6 +29,11 @@ var current_animation := "idle" @onready var default_height = main.position.y @onready var main_height_target = default_height +@onready var hairstyles = { + "Brown": $Main/Head/Hair, + "Blond": $Main/Head/Hair +} + func _ready(): play_animation("idle") @@ -53,6 +58,14 @@ func _process(delta): if current_animation != next_animation: play_animation(next_animation) +func select_hairstyle(id: int): + var target = hairstyles.keys()[id] + for k in hairstyles.keys(): + if k == target: + hairstyles[k].show() + else: + hairstyles[k].hide() + func play_animation(name_: String): current_animation = name_ hand_animations.play(name_) diff --git a/client/player/character/character.tscn b/client/player/character/character.tscn index d33a424e..a6f574ad 100644 --- a/client/player/character/character.tscn +++ b/client/player/character/character.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://b3hhir2fvnunu"] +[gd_scene load_steps=14 format=3 uid="uid://b3hhir2fvnunu"] [ext_resource type="Script" path="res://player/character/character.gd" id="1_12lbh"] [ext_resource type="ArrayMesh" uid="uid://bnmm01yjwultj" path="res://player/character/main.res" id="2_lxdbd"] @@ -6,6 +6,7 @@ [ext_resource type="ArrayMesh" uid="uid://r52cylox4imf" path="res://player/character/hand_left.res" id="4_ellbc"] [ext_resource type="ArrayMesh" uid="uid://csryncouqhwp1" path="res://player/character/head.res" id="5_tyg2e"] [ext_resource type="ArrayMesh" uid="uid://bsxmxq4dfv2vy" path="res://player/character/hair.res" id="6_rfl5m"] +[ext_resource type="ArrayMesh" uid="uid://dx7jswwaesok4" path="res://player/character/hair_2.res" id="7_0551e"] [ext_resource type="ArrayMesh" uid="uid://c2qnwt44x8ujl" path="res://player/character/tie.res" id="7_knv6q"] [sub_resource type="Animation" id="Animation_tdhvg"] @@ -591,6 +592,12 @@ transform = Transform3D(1.06667, 0, 0, 0, 1.06667, 0, 0, 0, 1.06667, 0, 0.4, 0) mesh = ExtResource("6_rfl5m") skeleton = NodePath("") +[node name="Hair2" type="MeshInstance3D" parent="Main/Head"] +transform = Transform3D(1.06667, 0, 0, 0, 1.06667, 0, 0, 0, 1.06667, 0, 0.4, 0) +visible = false +mesh = ExtResource("7_0551e") +skeleton = NodePath("") + [node name="Tie" type="MeshInstance3D" parent="Main"] transform = Transform3D(0.125, 0, 0, 0, 0.125, 0, 0, 0, 0.125, 0, 0.47772, 0.445265) mesh = ExtResource("7_knv6q") diff --git a/client/player/character/hair_2.res b/client/player/character/hair_2.res Binary files differnew file mode 100644 index 00000000..0764f879 --- /dev/null +++ b/client/player/character/hair_2.res |