Skip to content
Snippets Groups Projects
Commit d33ffa77 authored by SCHIEBER MORGANE's avatar SCHIEBER MORGANE :fries:
Browse files

#81 add a informative label + script modifications on characterSelection

parent fba5ff20
No related merge requests found
...@@ -449,7 +449,7 @@ custom_constants/margin_top = 20 ...@@ -449,7 +449,7 @@ custom_constants/margin_top = 20
custom_constants/margin_left = 80 custom_constants/margin_left = 80
custom_constants/margin_bottom = 20 custom_constants/margin_bottom = 20
[node name="TextureButton" type="TextureButton" parent="MarginContainer/VBoxContainer/marginSelectContainer/container/selection/charListContainer/buttonPlayMargin"] [node name="playButton" type="TextureButton" parent="MarginContainer/VBoxContainer/marginSelectContainer/container/selection/charListContainer/buttonPlayMargin"]
margin_left = 80.0 margin_left = 80.0
margin_top = 20.0 margin_top = 20.0
margin_right = 382.0 margin_right = 382.0
...@@ -461,7 +461,7 @@ texture_normal = ExtResource( 18 ) ...@@ -461,7 +461,7 @@ texture_normal = ExtResource( 18 )
expand = true expand = true
stretch_mode = 5 stretch_mode = 5
[node name="playButton" type="Button" parent="MarginContainer/VBoxContainer/marginSelectContainer/container/selection/charListContainer/buttonPlayMargin"] [node name="ouibon" type="Button" parent="MarginContainer/VBoxContainer/marginSelectContainer/container/selection/charListContainer/buttonPlayMargin"]
visible = false visible = false
margin_left = 80.0 margin_left = 80.0
margin_top = 20.0 margin_top = 20.0
......
...@@ -15,6 +15,7 @@ var CHAR3 ...@@ -15,6 +15,7 @@ var CHAR3
var CHAR4 var CHAR4
var BACK var BACK
var OPTIONS var OPTIONS
var PLAY
var CHARPIC1 = preload("res://assets/selectChar/charPic.jpg") var CHARPIC1 = preload("res://assets/selectChar/charPic.jpg")
var CHARPIC2 = preload("res://assets/selectChar/charPic.jpg") var CHARPIC2 = preload("res://assets/selectChar/charPic.jpg")
...@@ -38,6 +39,7 @@ func _ready(): ...@@ -38,6 +39,7 @@ func _ready():
CHAR4 = $MarginContainer/VBoxContainer/marginSelectContainer/container/selection/charListContainer/ScrollContainer/GridContainer/char4 CHAR4 = $MarginContainer/VBoxContainer/marginSelectContainer/container/selection/charListContainer/ScrollContainer/GridContainer/char4
BACK = $MarginContainer/VBoxContainer/header/Control/headerContainer/HBoxContainer/back BACK = $MarginContainer/VBoxContainer/header/Control/headerContainer/HBoxContainer/back
OPTIONS = $MarginContainer/VBoxContainer/header/Control/headerContainer/HBoxContainer/options OPTIONS = $MarginContainer/VBoxContainer/header/Control/headerContainer/HBoxContainer/options
PLAY = $MarginContainer/VBoxContainer/marginSelectContainer/container/selection/charListContainer/buttonPlayMargin/playButton
# Connect all the buttons # Connect all the buttons
CHAR1.connect("pressed", self, "characterSelected", ["char1"]) CHAR1.connect("pressed", self, "characterSelected", ["char1"])
...@@ -46,6 +48,7 @@ func _ready(): ...@@ -46,6 +48,7 @@ func _ready():
CHAR4.connect("pressed", self, "characterSelected", ["char4"]) CHAR4.connect("pressed", self, "characterSelected", ["char4"])
BACK.connect("pressed", self, "buttonHeader", ["back"]) BACK.connect("pressed", self, "buttonHeader", ["back"])
OPTIONS.connect("pressed", self, "buttonHeader", ["settings"]) OPTIONS.connect("pressed", self, "buttonHeader", ["settings"])
PLAY.connect("pressed", self, "buttonHeader", ["play"])
# Default character selected # Default character selected
characterSelected("char1") characterSelected("char1")
...@@ -64,7 +67,7 @@ func _process(delta): ...@@ -64,7 +67,7 @@ func _process(delta):
yWindow = get_viewport().size.y yWindow = get_viewport().size.y
#var x = float(xWindow)*ratio #var x = float(xWindow)*ratio
var y = float(yWindow)*ratio-stat_size var y = float(yWindow)*ratio-stat_size
print(stat_size) #print(stat_size)
#var brick_texture = anim_player.Frames.GetFrame("blue", 0); #var brick_texture = anim_player.Frames.GetFrame("blue", 0);
#anim_player.set_size(Vector2(y,y)) #anim_player.set_size(Vector2(y,y))
...@@ -111,25 +114,25 @@ func characterSelected(character): ...@@ -111,25 +114,25 @@ func characterSelected(character):
if character == "char1": if character == "char1":
_setTextureCharacter(CHARPIC1) _setTextureCharacter(CHARPIC1)
_setTextureProgress(SKILL_1, 45) _setTextureProgress(SKILL_1, 45)
_setTextureProgress(SKILL_2, 15) _setTextureProgress(SKILL_2, 78)
_setTextureProgress(SKILL_3, 76) _setTextureProgress(SKILL_3, 39)
_setTextureProgress(SKILL_4, 54) _setTextureProgress(SKILL_4, 27)
_setAnimatedSpriteCharacter("char1/true_size_10",99) _setAnimatedSpriteCharacter("char1/true_size_10",99)
_setNameCharacter("Madame Berceuse") _setNameCharacter("Lady Lullaby")
if character == "char2": if character == "char2":
_setTextureCharacter(CHARPIC2) _setTextureCharacter(CHARPIC2)
_setTextureProgress(SKILL_1, 27) _setTextureProgress(SKILL_1, 68)
_setTextureProgress(SKILL_2, 75) _setTextureProgress(SKILL_2, 43)
_setTextureProgress(SKILL_3, 63) _setTextureProgress(SKILL_3, 87)
_setTextureProgress(SKILL_4, 32) _setTextureProgress(SKILL_4, 41)
_setAnimatedSpriteCharacter("char2/",1) _setAnimatedSpriteCharacter("char2/",1)
_setNameCharacter("Monsieur Disco") _setNameCharacter("Monsieur Disco")
if character == "char3": if character == "char3":
_setTextureCharacter(CHARPIC3) _setTextureCharacter(CHARPIC3)
_setTextureProgress(SKILL_1, 40) _setTextureProgress(SKILL_1, 21)
_setTextureProgress(SKILL_2, 16) _setTextureProgress(SKILL_2, 74)
_setTextureProgress(SKILL_3, 74) _setTextureProgress(SKILL_3, 32)
_setTextureProgress(SKILL_4, 58) _setTextureProgress(SKILL_4, 68)
_setAnimatedSpriteCharacter("char3/angela",95) _setAnimatedSpriteCharacter("char3/angela",95)
_setNameCharacter("Angela") _setNameCharacter("Angela")
if character == "char4": if character == "char4":
...@@ -147,4 +150,9 @@ func buttonHeader(button_name): ...@@ -147,4 +150,9 @@ func buttonHeader(button_name):
if button_name == "back": if button_name == "back":
globals.load_new_scene("res://scenes/MultiSelectMenu.tscn") globals.load_new_scene("res://scenes/MultiSelectMenu.tscn")
elif button_name == "settings": elif button_name == "settings":
globals.load_new_scene("res://scenes/Settings.tscn") globals.load_new_scene("res://scenes/Settings.tscn")
\ No newline at end of file elif button_name == "play":
print("SEND THE USER AND THE CHARACTER TO THE SERVER")
print("THE SERVER WILL DO THE REST I THINK")
print("PUT THE GAME HERE")
print("AAAAAAAAAH")
\ No newline at end of file
...@@ -36,7 +36,7 @@ func _ready(): ...@@ -36,7 +36,7 @@ func _ready():
func selectedGame(button_name,playerNumber): func selectedGame(button_name,playerNumber):
var globals = get_node("/root/Globals") var globals = get_node("/root/Globals")
globals.NUMBER_OF_PLAYERS = playerNumber globals.NUMBER_OF_PLAYERS = playerNumber
globals.load_new_scene("res://scenes/MultiMode.tscn") globals.load_new_scene("res://scenes/CharacterSelection.tscn")
func buttonHeader(button_name): func buttonHeader(button_name):
var globals = get_node("/root/Globals") var globals = get_node("/root/Globals")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment