public void close() { Transform container = transform.Find("Image"); container.gameObject.SetActive(false); PlayerInfo.chestBeingPlayed = -1; PlayerInfo.chestsFound++; GameObject.Find("HUD/Image/chestCounterText").GetComponent <Text>().text = PlayerInfo.chestsFound.ToString() + "/" + PlayerInfo.CHESTS_TO_WIN.ToString(); PlayerInfo.current_step_game = PlayerInfo.STEP_NOT_PLAYING; // if (true) if (PlayerInfo.chestsFound == PlayerInfo.CHESTS_TO_WIN) { string path = "historico.txt"; using (var tw = new StreamWriter(path, true)) { tw.WriteLine(Time.time + " segundos: Finalizou todos os minigames\nFim de jogo."); } FinalMessage.setFinalAudio(); endgameMessage.gameObject.SetActive(true); PlayerInfo.chestBeingPlayed = 99; } }
public bool TryRemove(string id, out FinalMessage result) { if (!_memoryCache.TryGetValue(id, out result)) { return(false); } _memoryCache.Remove(id); return(true); }
/// <param name="cardId">Card ID</param> /// <param name="colors"></param> /// <param name="colorInRgb">With this color ImageGenerator will generate picture</param> /// <param name="colorSpace">Color space that used for this color</param> /// <returns>Card with preview image, which should be replaced with FinalMessage after sending</returns> public (InlineQueryResultPhoto, FinalMessage) ProcessInlineCardForColorSpace(string cardId, float[] colors, Rgba32 colorInRgb, ColorSpace colorSpace) { string previewUrl = _imageGeneratorClient.GetLink(colorInRgb, 250, 150, colorSpace.Name); string finalUrl = _imageGeneratorClient.GetLink(colorInRgb, 250, 150, null); string caption = _captionGenerator.GenerateCaption(colorSpace, colors); var card = new InlineQueryResultPhoto(cardId, previewUrl, previewUrl) { Caption = caption, PhotoWidth = 250, PhotoHeight = 150, ReplyMarkup = new InlineKeyboardMarkup(new InlineKeyboardButton { Text = "Loading...", CallbackData = "do-not-click-it" }) }; var finalMessage = new FinalMessage(finalUrl, caption); return(card, finalMessage); }
void Start() { PlayerInfo.SetMiniGames(); InitialMessage.setInitialText(); FinalMessage.setFinalText(); }
public void Awake() { instance = this; }