Topic was automatically imported from the old Question2Answer platform.
Asked By
RGames
extends Control
var Player_words = []
var Prompt = ["a show" , "adjective" , "verb" , "adjective"]
var Story ="I like %s cus it's %s ,Ever since my childhood I %s .so im %s"
onready var PlayerText = $VBoxContainer/HBoxContainer/PlayerText
onready var DisplayText =$VBoxContainer/DisplayText
func _ready():
DisplayText.text="Welcome to LoonyLips,Let's Have a Wonderful Time "
Check_player_word_length()
func _on_PlayerText_text_entered(new_text):
add_to_player_words()
func _on_TextureButton_pressed():
add_to_player_words()
func add_to_player_words():
Player_words.append( PlayerText)
DisplayText =""
PlayerText.clear()
Check_player_word_length()
func Is_story_done():
return Player_words.size() == Prompt.size()
func Check_player_word_length():
if Is_story_done():
tell_story()
else:
prompt_player()
func tell_story():
DisplayText.text = Story % Prompt
func prompt_player():
DisplayText.text +="May I have "+ Prompt[Player_words.size()]+" Please?"