Fixed score computation and added mouth masks
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://bvpyqyftqhy45"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dnt4l1eghm1gi" path="res://scenes/character/character.gd" id="1_cuyo6"]
|
||||
[ext_resource type="Resource" uid="uid://wq3g1j3l4gl6" path="res://resources/characters/queen.tres" id="2_fgi2k"]
|
||||
[ext_resource type="Texture2D" uid="uid://c726frtpkk1a8" path="res://assets/characters/Perso 2.png" id="3_f8hpl"]
|
||||
[ext_resource type="Resource" uid="uid://c87odmn680x7" path="res://resources/characters/duchex.tres" id="2_fgi2k"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwy3kklywl0ci" path="res://assets/characters/Perso 1.png" id="3_f8hpl"]
|
||||
[ext_resource type="PackedScene" uid="uid://3jlukpb5hefb" path="res://scenes/mask/mask.tscn" id="3_mutn8"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fgi2k"]
|
||||
@@ -164,11 +164,12 @@ chara_resource = ExtResource("2_fgi2k")
|
||||
texture = ExtResource("3_f8hpl")
|
||||
|
||||
[node name="MaskMouth" parent="." unique_id=1087336064 instance=ExtResource("3_mutn8")]
|
||||
position = Vector2(51.77, 409.63)
|
||||
position = Vector2(60.92, 208.96)
|
||||
rotation = -0.05235988
|
||||
|
||||
[node name="MaskEyes" parent="." unique_id=428968220 instance=ExtResource("3_mutn8")]
|
||||
position = Vector2(48, 130)
|
||||
rotation = 0.05235988
|
||||
position = Vector2(92.37, 201.415)
|
||||
rotation = -0.017453292
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=713965213]
|
||||
libraries/ = SubResource("AnimationLibrary_7ex5l")
|
||||
|
||||
@@ -388,6 +388,7 @@ lvl2_guest_1 = ExtResource("27_62f45")
|
||||
lvl2_guest_2 = ExtResource("30_6g32y")
|
||||
lvl3_guest_1 = ExtResource("33_f4j1x")
|
||||
lvl3_guest_2 = ExtResource("29_62f45")
|
||||
current_level = 2
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=1166192115]
|
||||
limit_left = -960
|
||||
|
||||
@@ -28,6 +28,7 @@ class_name GameManager
|
||||
@export var lvl3_guest_2: MaskedChara
|
||||
|
||||
@export_category("Random levels")
|
||||
@export var current_level: Levels = Levels.LVL1
|
||||
@export_tool_button("Create chara roster") var create_roster_action = create_new_roster
|
||||
|
||||
var current_chara_roster: Array[MaskedChara]
|
||||
@@ -44,7 +45,6 @@ enum Levels {
|
||||
RANDOM
|
||||
}
|
||||
var current_game_state = GameState.READY
|
||||
var current_level = Levels.LVL2
|
||||
var first_guest = true
|
||||
var current_guest: MaskedChara
|
||||
var selected_seat: Seat
|
||||
|
||||
@@ -5,7 +5,7 @@ class_name MaskedChara
|
||||
@export var face_mask: MaskResource
|
||||
@export var mouth_mask: MaskResource
|
||||
|
||||
@export var pref_score_map: Dictionary[CharacterResource.Preference, float] = {
|
||||
var pref_score_map: Dictionary[CharacterResource.Preference, float] = {
|
||||
CharacterResource.Preference.LOVE: 2.0,
|
||||
CharacterResource.Preference.APPROVE: 1.0,
|
||||
CharacterResource.Preference.DONT_CARE: 0.0,
|
||||
@@ -44,9 +44,11 @@ func compute_score(other_guests: Array[MaskedChara]) -> float:
|
||||
strength *= face_mask.stimuli_multiplier
|
||||
trait_strength += strength
|
||||
|
||||
var preference = character.preferences.get(guest_trait) if guest_trait in character.preferences else CharacterResource.Preference.APPROVE
|
||||
var score_multiplier = pref_score_map.get(preference) if preference in pref_score_map else 1.0
|
||||
var preference = character.preferences.get(guest_trait) if guest_trait in character.preferences else CharacterResource.Preference.DONT_CARE
|
||||
var score_multiplier = pref_score_map.get(preference) if preference in pref_score_map else 0.0
|
||||
guest_appreciation += trait_strength*score_multiplier
|
||||
|
||||
print("%s guest appreciation %s" % [character.name, guest_appreciation])
|
||||
|
||||
overall_score += guest_appreciation
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[gd_scene format=3 uid="uid://3jlukpb5hefb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cfo3mk5f2q3ej" path="res://scenes/mask/mask.gd" id="1_61b51"]
|
||||
[ext_resource type="Resource" uid="uid://q3o5oxegjx2" path="res://resources/masks/no_smell.tres" id="2_0pm64"]
|
||||
[ext_resource type="Texture2D" uid="uid://b4d451508si3t" path="res://assets/masks/Masque 3.png" id="3_htpgb"]
|
||||
[ext_resource type="Resource" uid="uid://pdiaprcknftw" path="res://resources/masks/mute.tres" id="2_0pm64"]
|
||||
[ext_resource type="Texture2D" uid="uid://bfnvs01ynm55q" path="res://assets/masks/Bouche 3.png" id="3_0pm64"]
|
||||
|
||||
[node name="Mask" type="Node2D" unique_id=428968220]
|
||||
script = ExtResource("1_61b51")
|
||||
mask_resource = ExtResource("2_0pm64")
|
||||
|
||||
[node name="MaskSprite" type="Sprite2D" parent="." unique_id=1997645103]
|
||||
texture = ExtResource("3_htpgb")
|
||||
texture = ExtResource("3_0pm64")
|
||||
|
||||
Reference in New Issue
Block a user