Переписываение системы призов под новые требования(в процессе)

This commit is contained in:
se_ga 2026-03-10 12:33:17 +03:00
parent 526e869eab
commit 042c82371b
369 changed files with 13563 additions and 48936 deletions

View File

@ -11349,7 +11349,7 @@ Material:
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
- _GlowColor: {r: 0, g: 1, b: 0.28621435, a: 1}
- _GlowColor: {r: 1, g: 0.0031421185, b: 0, a: 1}
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
- _OutlineColor: {r: 0.554717, g: 0.554717, b: 0.554717, a: 1}
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using PrizeSystem;
public class Character : MonoBehaviour
{

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using PrizeSystem;
public class CharacterController : MonoBehaviour
{
@ -116,7 +116,7 @@ public class CharacterController : MonoBehaviour
public void RefreshPrizes()
{
List<Prize> prizes = PrizeSerializer.GetPrizes();
List<Prize> prizes = PrizeSerializer.LoadPrizes();
for (int i = 0;i < characters.Length; i++)
{

View File

@ -1,286 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class CharacterSettingPanel : MonoBehaviour
{
[SerializeField] TextMeshProUGUI nameLabel;
[SerializeField] TextMeshProUGUI PrizeTypeLabel;
[SerializeField] TextMeshProUGUI AmountLabel;
[SerializeField] Image CharacterIcon;
[SerializeField] Image ConfirmIcon;
[SerializeField] RectTransform pointer;
[SerializeField] List<Vector2> pointerPositions = new List<Vector2>() { };
[SerializeField] List<Graphic> fadeGraphics;
[SerializeField] float fadeTime = 0.5f;
private Coroutine fadeInCoroutine;
private Coroutine fadeOutCoroutine;
Character[] characters;
int botsAmount;
List<Prize> prizes;
int direction1; //джойстик 1 выбор настройки
int direction2; //джойстик 2 выбор опции внутир настройки
int direction3; //p1 | p2 переключение персонажа
bool holdingSave; //держим p1 + p2
float timeToConfirm = 3;
float timeRest;
int characterIndex = 0;
int prizeTypeIndex;
int prizeAmount;
int setting = 0; // что сейчас настраивается. 0 - тип приза, 1 - количество призов
Array PrizeTypes = Enum.GetValues(typeof(PrizeType));
private void OnEnable() => Initialize();
private void Update()
{
collectInputs();
SwitchSetting(direction1);
SwitchOption(direction2);
SwitchCharacter(direction3);
SaveProcess(holdingSave);
}
void Initialize()
{
prizes = PrizeSerializer.GetPrizes();
characters = CharacterController.I.characters;
botsAmount = GameManager.instance.botsAmount;
timeRest = timeToConfirm;
characterIndex = 0;
SetCharacter(characterIndex);
}
void SetCharacter(int index)
{
Character characterToSet = characters[index];
Prize prizeToSet = prizes[index];
nameLabel.text = characterToSet.Name;
PrizeTypeLabel.text = PrizeTypeToString(prizeToSet.PrizeType);
prizeAmount = ValidatePrizeAmount(prizeToSet.Amount, prizeToSet.PrizeType);
prizeToSet.Amount = prizeAmount;
AmountLabel.text = prizeToSet.Amount.ToString();
CharacterIcon.sprite = characterToSet.Icon;
prizeTypeIndex = Array.IndexOf(PrizeTypes, prizeToSet.PrizeType);
setting = 0;
pointer.anchoredPosition = pointerPositions[setting];
}
void collectInputs()
{
direction1 = 0;
direction1 += In.GetButtonDown(ButtonPinMapping.left1) ? -1 : 0;
direction1 += In.GetButtonDown(ButtonPinMapping.right1) ? +1 : 0;
direction2 = 0;
direction2 += In.GetButtonDown(ButtonPinMapping.left2) ? -1 : 0;
direction2 += In.GetButtonDown(ButtonPinMapping.right2) ? +1 : 0;
direction3 = 0;
direction3 += In.GetButtonDown(ButtonPinMapping.startOnePlayer) ? -1 : 0;
direction3 += In.GetButtonDown(ButtonPinMapping.startTwoPlayers) ? +1 : 0;
holdingSave = In.GetButton(ButtonPinMapping.startOnePlayer) && In.GetButton(ButtonPinMapping.startTwoPlayers);
}
//перекл между настройками (тип -> колво)
void SwitchSetting(int direction)
{
if (direction == 0) return;
if (direction == -1)
{
setting = 0;
}
if (direction == 1)
{
setting = 1;
}
pointer.anchoredPosition = pointerPositions[setting];
}
//перекл между опциями внутри настройки
void SwitchOption(int direction)//тут будем записываться
{
if (direction == 0) return;
if (setting == 0)//меняем тип
{
prizeTypeIndex = (prizeTypeIndex + direction + PrizeTypes.Length) % PrizeTypes.Length;
PrizeType prizeTypeToSet = (PrizeType)PrizeTypes.GetValue(prizeTypeIndex);
//validation: отсечь спец приз всем кроме последнего
if (characterIndex != botsAmount-1 && prizeTypeToSet == PrizeType.Special)
{
prizeTypeIndex = (prizeTypeIndex + direction + PrizeTypes.Length) % PrizeTypes.Length;
prizeTypeToSet = (PrizeType)PrizeTypes.GetValue(prizeTypeIndex);
}
PrizeTypeLabel.text = PrizeTypeToString(prizeTypeToSet);
prizes[characterIndex].PrizeType = prizeTypeToSet;
prizeAmount = ValidatePrizeAmount(prizeAmount, prizes[characterIndex].PrizeType);
AmountLabel.text = prizeAmount.ToString();
prizes[characterIndex].Amount = prizeAmount;
}
if (setting == 1)//меняем количество
{
prizeAmount += direction;
prizeAmount = ValidatePrizeAmount(prizeAmount, prizes[characterIndex].PrizeType);
prizes[characterIndex].Amount = prizeAmount;
AmountLabel.text = prizeAmount.ToString();
}
}
int ValidatePrizeAmount(int amount, PrizeType prizeType)
{
if (prizeType == PrizeType.None)
{
return 0;
}
if (prizeType == PrizeType.Hopper || prizeType == PrizeType.Hopper2)
{
return Mathf.Clamp(amount, 1, 5);
}
if (prizeType == PrizeType.Special)
{
return 1;
}
if (prizeType == PrizeType.Ticket)
{
return Mathf.Clamp(amount, 1, 100);
}
if (prizeType == PrizeType.Marbles)
{
return Mathf.Clamp(amount, 1, 5);
}
return 0;
}
void SwitchCharacter(int direction)
{
if (direction == 0) { return; }
characterIndex = (characterIndex + direction + botsAmount) % botsAmount;
SetCharacter(characterIndex);
}
void SaveProcess(bool pressed)
{
HandleFadeAnimation(pressed);
HandleConfirmationTimer(pressed);
if (ShouldExecuteSave())
SaveAndClose();
}
private bool ShouldExecuteSave() =>
timeRest <= 0;
private void HandleConfirmationTimer(bool pressed)
{
timeRest += Time.deltaTime;
if (pressed) timeRest -= Time.deltaTime * 2;
timeRest = Mathf.Clamp(timeRest, 0, timeToConfirm);
ConfirmIcon.fillAmount = (timeToConfirm - timeRest) / timeToConfirm;
}
private void HandleFadeAnimation(bool pressed)
{
if (pressed)
{
if (fadeInCoroutine == null)
{
if (fadeOutCoroutine != null)
{
StopCoroutine(fadeOutCoroutine);
fadeOutCoroutine = null;
}
fadeInCoroutine = StartCoroutine(Fade(1));
}
}
else
{
if (Mathf.Approximately(timeRest, timeToConfirm) && fadeOutCoroutine == null)
{
if (fadeInCoroutine != null)
{
StopCoroutine(fadeInCoroutine);
fadeInCoroutine = null;
}
fadeOutCoroutine = StartCoroutine(Fade(-1));
}
}
}
private void SaveAndClose()
{
PrizeSerializer.SetPrizes(prizes);
CharacterController.I.RefreshPrizes();
timeRest = timeToConfirm;
GameManager.instance.stateMachine.ChangeState(new SettingsState());
}
string PrizeTypeToString(PrizeType prizeType)
{
return prizeType switch
{
PrizeType.None => "Без приза",
PrizeType.Hopper => "Хоппер 1",
PrizeType.Hopper2 => "Хоппер 2",
PrizeType.Ticket => "Билет",
PrizeType.Special => "Суперприз",
PrizeType.Marbles => "Марблс",
_ => "Без приза"
};
}
IEnumerator Fade(int direction)
{
Vector4 color = fadeGraphics[0].color;
Vector4 targetColor = direction switch
{
-1 => new Vector4(1, 1, 1, 0),
1 => new Vector4(1, 1, 1, 1),
_ => new Vector4(1, 1, 1, 0)
};
while (color != targetColor)
{
color = Vector4.MoveTowards(color, targetColor, Time.deltaTime / fadeTime);
foreach (Graphic graphic in fadeGraphics)
{
graphic.color = color;
}
yield return null;
}
}
}

View File

@ -1,5 +1,6 @@
using TMPro;
using UnityEngine;
using PrizeSystem;
public class SettingsActions : MonoBehaviour
{
@ -29,12 +30,12 @@ public class SettingsActions : MonoBehaviour
public void ResetCoinsCounter()
{
PlayerPrefs.SetInt(PrizeSystem.key_cashNul, 0);
PlayerPrefs.SetInt(PrizeSystemManager.key_cashNul, 0);
RefreshUI();
}
public void ResetPrizes()
{
PrizeSystem.ResetPrizeCounters();
PrizeSystemManager.ResetPrizeCounters();
RefreshUI();
}
@ -59,7 +60,7 @@ public class SettingsActions : MonoBehaviour
{
if(SettingsManager.GetBool("Prizing", false))
{
PrizeSystem.GivePrize(new Prize(PrizeType.Hopper, 1));
PrizeSystemManager.GivePrize(PrizeUtils.CreatePrize(CountablePrizeType.Hopper, 1));
}
else
{
@ -89,13 +90,13 @@ public class SettingsActions : MonoBehaviour
{
string valutaName = PlayerPrefs.GetString("ValutaName", "руб.");
starts.text = STARTS_BASE + UNNULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystem.key_cash) + " " + valutaName;
startsNul.text = STARTS_BASE + NULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystem.key_cashNul) + " " + valutaName;
starts.text = STARTS_BASE + UNNULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystemManager.key_cash) + " " + valutaName;
startsNul.text = STARTS_BASE + NULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystemManager.key_cashNul) + " " + valutaName;
//prize.text = PRIZE_BASE + UNNULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystem.key_prizesgiven);
//prizeNul.text = PRIZE_BASE + NULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystem.key_prizesgivenNul);
prize.text = PRIZE_BASE + UNNULLABLE + ": " + PrizeSystem.GetPrizesCounterString();
prizeNul.text = PRIZE_BASE + NULLABLE + ": " + PrizeSystem.GetPrizesCounterNullableString();
prize.text = PRIZE_BASE + UNNULLABLE + ": " + PrizeSystemManager.GetPrizesCounterString();
prizeNul.text = PRIZE_BASE + NULLABLE + ": " + PrizeSystemManager.GetPrizesCounterNullableString();
}
void RefreshUI(int a) => RefreshUI();

View File

@ -1,4 +1,5 @@
using System;
using PrizeSystem;
using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
@ -41,11 +42,11 @@ public class FastCheckCounters : MonoBehaviour
}
void RefreshUI()
{
starts.text = STARTS_BASE + UNNULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystem.key_cash);
startsNul.text = STARTS_BASE + NULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystem.key_cashNul);
starts.text = STARTS_BASE + UNNULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystemManager.key_cash);
startsNul.text = STARTS_BASE + NULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystemManager.key_cashNul);
prize.text = PRIZE_BASE + UNNULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystem.key_prizesgiven);
prizeNul.text = PRIZE_BASE + NULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystem.key_prizesgivenNul);
prize.text = PRIZE_BASE + UNNULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystemManager.key_prizesgiven);
prizeNul.text = PRIZE_BASE + NULLABLE + ": " + PlayerPrefs.GetInt(PrizeSystemManager.key_prizesgivenNul);
}
IEnumerator disabling()

View File

@ -30,7 +30,7 @@ public class BotThinkingState : IState
//Установка пресета сложности
DifficultyPreset currentPreset = CharacterController.CurrentCharacter.CurrentDifficultyPreset;
Debug.Log(currentPreset.Description);
//Debug.Log(currentPreset.Description);
if (GameManager.instance.dummyBots)
currentPreset = GameManager.instance.dummyPreset;
@ -123,7 +123,7 @@ public class BotThinkingState : IState
//NeedSuperPreset = true;
Debug.Log($"Использовать суперсложность: {NeedSuperPreset}\nСейчас босс: {OnBossByScore}\nСложная сложность: {IsHardCommonDifficulty}\nВключен режим заработка: {IsUpperCashDifficulty}\n");
//Debug.Log($"Использовать суперсложность: {NeedSuperPreset}\nСейчас босс: {OnBossByScore}\nСложная сложность: {IsHardCommonDifficulty}\nВключен режим заработка: {IsUpperCashDifficulty}\n");
if (NeedSuperPreset)
{

View File

@ -1,22 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CheckPaymentState : IState
{
public void enter()
{
throw new System.NotImplementedException();
}
public void exit()
{
throw new System.NotImplementedException();
}
public void update()
{
throw new System.NotImplementedException();
}
}

View File

@ -127,7 +127,8 @@ public class ChipFallingState : IState
chipTransform.position = targetPosition;
GameManager.fieldModel.FieldArray[rowIndex, colIndex] = GameManager.instance.currentPlayer;
GameManager.instance.setChipTransformToArray(rowIndex, colIndex, chipTransform);
GameManager.instance.stateMachine.ChangeState(new CheckState());
//GameManager.instance.stateMachine.ChangeState(new CheckState());
EndOfTurnHandler.NormalHandling();
}
#endregion

View File

@ -1,13 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PrizeSystem;
public class EnterPrizesForCharactersState : IState
{
GameObject rootPanel;
List<Prize> prizes;
IState prevState;
public EnterPrizesForCharactersState(IState prevState)
{
this.prevState = prevState;
@ -22,7 +23,6 @@ public class EnterPrizesForCharactersState : IState
public void exit()
{
rootPanel.SetActive(false);
//GameManager.instance.stateMachine.ChangeState(prevState);
}
public void update()
{

View File

@ -1,36 +1,44 @@
using UnityEngine;
public class ClearFieldState : IState
public static class FieldCleaner
{
const int FIELD_HEIGHT = 6;
const int FIELD_WIDTH = 7;
const string SORTLAYER_BACKGROUND = "Background";
const float EXPLOSION_FORCE = 30;
readonly Vector3 EXPLOSION_ORIGIN = new Vector3(0, -2, -5);
static readonly Vector3 EXPLOSION_ORIGIN = new Vector3(0, -2, -5);
const float EXPLOSION_RADIUS = 50;
const float TIME_TO_DESTROY = 5;
Transform[,] field;
static Transform[,] field;
bool toMenu;
CellState firstPlayer;
static bool toMenu;
static CellState firstPlayer;
//передаем переходим мы в меню или нет. Если нет, то переход отсюда в новый раунд
//Надо еще сделать в конструкторе чтобы nextState указывать а то ж непонятно вообще
public ClearFieldState(bool toMenu, CellState firstPlayer)
public static void Clear(bool to_menu, CellState _firstPlayer)
{
this.toMenu = toMenu;
this.firstPlayer = firstPlayer;
}
toMenu = to_menu;
firstPlayer = _firstPlayer;
public void enter()
{
field = GameManager.instance.chipTransforms;
SoundManager.instance.playExplosion();
//блок непоняток
if (GameManager.instance.currentChip != null)
{
Object.Destroy(GameManager.instance.currentChip);
}
GameManager.fieldModel.makeEmptyField(width: GameManager.instance.Cols, height: GameManager.instance.Rows);
GameManager.instance.chipTransforms = new Transform[GameManager.instance.Rows, GameManager.instance.Cols];
Explode();
//переход
@ -54,11 +62,11 @@ public class ClearFieldState : IState
GameManager.instance.stateMachine.ChangeState(new StartRoundState(firstPlayer: firstPlayer));
}
return;
}
private void Explode()
private static void Explode()
{
for (int i = 0; i < GameManager.instance.Rows; i++)
{
@ -77,20 +85,7 @@ public class ClearFieldState : IState
}
}
}
}
public void exit()
{
if (GameManager.instance.currentChip != null)
{
Object.Destroy(GameManager.instance.currentChip);
}
GameManager.fieldModel.makeEmptyField(width: GameManager.instance.Cols, height: GameManager.instance.Rows);
GameManager.instance.chipTransforms = new Transform[GameManager.instance.Rows, GameManager.instance.Cols];
}
public void update(){ }
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fa51d5f9249da4247a2d10da6556b9ae
guid: ae3604a5803730846bbf06830500a11e
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -24,6 +24,8 @@ public class LeaderboardState : IState
leaderboard = GameManager.instance.leaderboard;
leaderboard.gameObject.SetActive(true);
//ТУТ НАДО ПОМЕНЯТЬ ЛОГИКУ
bool showContacts = PlayerPrefs.GetInt("NeedSpecialPrize") == 1;
leaderboard.Initialize(showContacts: showContacts);
PlayerPrefs.SetInt("NeedSpecialPrize", 0);
@ -47,7 +49,8 @@ public class LeaderboardState : IState
{
if (In.GetButtonDownAnyPlayer(PlayerAction.down))
{
GameManager.instance.stateMachine.ChangeState(new ClearFieldState(true, CellState.Player1));
//GameManager.instance.stateMachine.ChangeState(new FieldCleaner(true, CellState.Player1));
FieldCleaner.Clear(true, CellState.Player1);
}
}
}

View File

@ -1,7 +1,7 @@
using System.Collections;
using UnityEngine;
enum MenuSubStates {OpeningMenu, Choosing, Payment, ClosingMenu, SwitchState}
enum MenuSubStates { OpeningMenu, Choosing, Payment, ClosingMenu, SwitchState }
public class MenuState : IState
{
GameManager gm;
@ -41,11 +41,11 @@ public class MenuState : IState
//подсказка + лого + техподдержка
sLabel2 = new Vector2(0, -380),
eLabel2 = new Vector2(0, -1000),
//ИГРОВОЕ ПОЛЕ
sBoard = new Vector2(-40, -0.5f),
eBoard = new Vector2(0, -0.5f),
sNoPrize = new Vector2(-0, -70f),
eNoPrize = new Vector2(15, -409);
Vector3
@ -118,7 +118,7 @@ public class MenuState : IState
switch (subState)
{
case MenuSubStates.OpeningMenu:
OpenMenu();
OpenMenu();
break;
case MenuSubStates.Choosing:
ChoosingMode();
@ -152,7 +152,7 @@ public class MenuState : IState
//Определяемся с режимом игры
if (GamemodeChosen()) return;
//Правила
if (In.GetButtonDownAnyPlayer(PlayerAction.down))
{
@ -162,7 +162,7 @@ public class MenuState : IState
//Промовидос
ElapsedPromoTimer = Mathf.Clamp(ElapsedPromoTimer +Time.deltaTime, 0, SecondsToPromo);
ElapsedPromoTimer = Mathf.Clamp(ElapsedPromoTimer + Time.deltaTime, 0, SecondsToPromo);
if (ElapsedPromoTimer == SecondsToPromo)
{
gm.stateMachine.ChangeState(new PromoState());
@ -198,7 +198,7 @@ public class MenuState : IState
private bool ShouldGotosettings()
{
//читаем кнопки
bool settingButtonPressed = In.GetButton(ButtonPinMapping.secret) || Input.GetKey(KeyCode.F5);
bool settingButtonPressed = In.GetButton(ButtonPinMapping.secret);
//считаем таймер
float sign = settingButtonPressed ? 1 : -1;
@ -206,7 +206,12 @@ public class MenuState : IState
ElapsedSettinsPressedTime = Mathf.Clamp(ElapsedSettinsPressedTime, 0, GotoSettingsPressedTime);
//Жали столько сколько надо для захода в меню
if (ElapsedSettinsPressedTime == GotoSettingsPressedTime)
if (ElapsedSettinsPressedTime == GotoSettingsPressedTime
#if UNITY_EDITOR
|| Input.GetKey(KeyCode.F5)//по f5 для тестов заходим моментально
#endif
)
{
ElapsedSettinsPressedTime = 0;
return true;
@ -238,7 +243,7 @@ public class MenuState : IState
private void Payment()
{
int creditsPrice = gm.gameMode == GameMode.pve ? PlayerPrefs.GetInt("PricePVE", 10) : PlayerPrefs.GetInt("PricePVP", 10);
if (SingleWallet.Pay(creditsPrice))
{//оплата успешно - закрываем меню
@ -254,7 +259,7 @@ public class MenuState : IState
void CloseMenu()
{
gm.timerManager.SetTimersActivity(gm.gameMode);
gm.menuOpened = true;
animationEnded = false;
@ -288,7 +293,7 @@ public class MenuState : IState
//при переходе из меню первым ходит игрок1
gm.stateMachine.ChangeState(new StartRoundState(CellState.Player1));
if(gm.gameMode==GameMode.pve) gm.movesAndTimeCounter.SetVisibility(true);
if (gm.gameMode == GameMode.pve) gm.movesAndTimeCounter.SetVisibility(true);
}
}
}
@ -302,17 +307,17 @@ public class MenuState : IState
parametr = 0;
while (parametr < 1)
{
parametr += Time.deltaTime*2;
parametr += Time.deltaTime * 2;
label.localPosition = Vector3.Lerp(sLabel, eLabel, parametr);
label.localPosition = Vector3.Lerp(sLabel, eLabel, parametr);
buttonLeft.localPosition = Vector3.Lerp(new Vector3(-sButton.x, sButton.y,0), new Vector3(-eButton.x, eButton.y, 0), parametr);
buttonRight.localPosition = Vector3.Lerp(sButton, eButton, parametr);
buttonLeft.localPosition = Vector3.Lerp(new Vector3(-sButton.x, sButton.y, 0), new Vector3(-eButton.x, eButton.y, 0), parametr);
buttonRight.localPosition = Vector3.Lerp(sButton, eButton, parametr);
label2.localPosition = Vector3.Lerp(sLabel2, eLabel2, parametr);
noPrizeLabel.localPosition = Vector3.Lerp(sNoPrize, eNoPrize+Vector2.left*3500, parametr);
coinPanel.localPosition = Vector3.Lerp(sCoin, eCoin, parametr);
label2.localPosition = Vector3.Lerp(sLabel2, eLabel2, parametr);
noPrizeLabel.localPosition = Vector3.Lerp(sNoPrize, eNoPrize + Vector2.left * 3500, parametr);
coinPanel.localPosition = Vector3.Lerp(sCoin, eCoin, parametr);
SmallPrizesOut.sizeDelta = Vector2.Lerp(sSmallPrizesOutSize, eSmallPrizesOutSize, parametr);
@ -326,8 +331,8 @@ public class MenuState : IState
while (parametr < 1)
{
parametr += Time.deltaTime * 2;
board.localPosition = Vector3.Lerp(sBoard, eBoard, parametr);
noPrizeLabel.localPosition = Vector3.Lerp(sNoPrize + Vector2.left * 3500, eNoPrize, parametr);
board.localPosition = Vector3.Lerp(sBoard, eBoard, parametr);
noPrizeLabel.localPosition = Vector3.Lerp(sNoPrize + Vector2.left * 3500, eNoPrize, parametr);
yield return null;
}
@ -344,12 +349,12 @@ public class MenuState : IState
while (parametr >= 0)
{
board.localPosition = Vector3.Lerp(sBoard, eBoard, parametr);
noPrizeLabel.localPosition = Vector3.Lerp(eNoPrize + Vector2.left * 3500, eNoPrize , parametr);
noPrizeLabel.localPosition = Vector3.Lerp(eNoPrize + Vector2.left * 3500, eNoPrize, parametr);
parametr -= Time.deltaTime * 2;
yield return null;
}
parametr = 1;
while (parametr >= 0)
{
@ -359,13 +364,13 @@ public class MenuState : IState
//перемещение кнопок
buttonLeft.localPosition = Vector3.Lerp(
-sButton + Vector2.up *sButton.y*2, //к точке старта (Y инвертируем)
-sButton + Vector2.up * sButton.y * 2, //к точке старта (Y инвертируем)
-eButton, //от спрятанной позиции
parametr);
buttonRight.localPosition = Vector3.Lerp(
sButton /*+ Vector2.up * 10f*/,
eButton ,
eButton,
parametr);
noPrizeLabel.localPosition = Vector3.Lerp(sNoPrize, eNoPrize + Vector2.left * 3500, parametr);
@ -392,10 +397,10 @@ public class MenuState : IState
}
//это было в конце корутины открытия меню
//gm.botScale.gameObject.SetActive(false);
//gm.Player1Scale.gameObject.SetActive(false);
//gm.Player2Scale.gameObject.SetActive(false);// это не через шкала менеджер делается?
//СДЕЛАЛ метод для выключения таймеров в менеджере
//gm.botScale.gameObject.SetActive(false);
//gm.Player1Scale.gameObject.SetActive(false);
//gm.Player2Scale.gameObject.SetActive(false);// это не через шкала менеджер делается?
//СДЕЛАЛ метод для выключения таймеров в менеджере
}

View File

@ -185,7 +185,7 @@ public class PositioningState : IState
bool exitPressed = In.GetButtonDown(ButtonPinMapping.startOnePlayer) || In.GetButtonDown(ButtonPinMapping.startTwoPlayers);
if (exitPressed && !gm.moveMade)
{
gm.stateMachine.ChangeState(new ClearFieldState(toMenu: true, CellState.Player1));
FieldCleaner.Clear(true, CellState.Player1);
SingleWallet.ReturnCredits(gm.gameMode);
GameManager.instance.timerManager.StopAllTimers();
}

View File

@ -1,7 +1,5 @@
using System.Collections;
using System.Collections.Generic;
using System.Collections.Generic;
using TMPro;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
@ -61,9 +59,6 @@ public class ShowWinnerState : IState
subState = ShowWinnerSubstates.PanelFalling;
ToMenuLabel.gameObject.SetActive(true);
}
//общее для всех режимов
//coinPanel = GameManager.coinPanel;
//таймер
GameManager.timerManager.StopAllTimers();
@ -129,11 +124,7 @@ public class ShowWinnerState : IState
}
}
}
}
public void exit()
@ -191,9 +182,12 @@ public class ShowWinnerState : IState
//чистимся и топаем дальше в след раунд
if (GameManager.currentPlayer == CellState.Player1)
GameManager.stateMachine.ChangeState(new ClearFieldState(false, CellState.Player2));
{
FieldCleaner.Clear(false, CellState.Player2);
}
else
GameManager.stateMachine.ChangeState(new ClearFieldState(false, CellState.Player1));
FieldCleaner.Clear(false, CellState.Player1);
}
}
@ -250,18 +244,18 @@ public class ShowWinnerState : IState
if (GameManager.currentPlayer == CellState.Player1)
{
AvatarEventBus.Instance.OnNewRoundStarted?.Invoke(CellState.Player1);
GameManager.stateMachine.ChangeState(new ClearFieldState(false, CellState.Player2));
FieldCleaner.Clear(false, CellState.Player2);
}
else
{
AvatarEventBus.Instance.OnNewRoundStarted?.Invoke(CellState.Player2);
GameManager.stateMachine.ChangeState(new ClearFieldState(false, CellState.Player1));
FieldCleaner.Clear(false, CellState.Player1);
}
break;
case EndOption.Menu://чистим поле и переходим в меню с параметром чтобы панельки съехались обратно
CharacterController.HideCharacter();
DualAvatarController.Instance.HideCharacters();
GameManager.stateMachine.ChangeState(new ClearFieldState(true, CellState.Player1));
FieldCleaner.Clear(true, CellState.Player1);
break;
}
}
@ -379,8 +373,6 @@ public class ShowWinnerState : IState
//revengeprice
if (gameManager.gameMode == GameMode.pve)
coinCounter?.SetRevengePriceVisibility(true);
}
}
@ -395,19 +387,6 @@ public class ShowWinnerState : IState
winningChips.Add(renderer);
renderer.gameObject.AddComponent<SinRotator>().speed = 8;
}
//for (int i = 0; i < 4; i++)
//{
// int row = result.indexesRow[i];
// int col = result.indexesColumn[i];
// GameManager.chipTransforms[row, col].rotation = Quaternion.identity;
// winningChips.Add(GameManager.chipTransforms[row, col].GetChild(0)
// .GetComponent<SpriteRenderer>());
// winningChips[i].AddComponent<SinRotator>().speed = 8;
//}
}
void BlinkChips()
{
@ -418,38 +397,4 @@ public class ShowWinnerState : IState
chip.color = c;
}
}
/*Vector3
sCoin = new Vector3(0, -1.93f, 0),
eCoin = new Vector3(-8.964f, 3.6f, 0);
IEnumerator CoinToSide()
{
float parametr = 0;
while (parametr <= 1)
{
GameManager.coinPanel.localPosition = Vector3.Lerp(sCoin, eCoin, parametr);
parametr += Time.deltaTime * 2;
yield return null;
}
}
IEnumerator CoinToCenter()
{
float parametr = 0;
while (parametr < 1)
{
GameManager.coinPanel.localPosition = Vector3.Lerp(eCoin, sCoin, parametr);
parametr += Time.deltaTime;
yield return null;
}
GameManager.coinPanel.localPosition = sCoin;
}*/
}

View File

@ -1,13 +1,13 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using System.Collections;
using PrizeSystem;
#if UNITY_EDITOR
using UnityEditor;
@ -324,7 +324,7 @@ public class GameManager : MonoBehaviour
#region MAIN
public int Rows = 6, Cols = 7;
public int Rows = 7, Cols = 7;
public PlayerStatsService StatsService;
public bool dummyBots = false;
public int botsAmount = 5;
@ -472,7 +472,7 @@ public class GameManager : MonoBehaviour
ProcessDifficultyCounter();
GetComponent<In>().Initialize();
GetComponent<PrizeSystem>().Initialize();
GetComponent<PrizeSystemManager>().Initialize();
GetComponent<VideoUtility>().Initialize();
StatsService = new();
StatsService.Initialize();
@ -494,7 +494,6 @@ public class GameManager : MonoBehaviour
private static void InitializePrefs()
{
PlayerPrefs.SetString("Serial", ExternalFilesGetter.GetSerial());
PlayerPrefs.SetInt("NeedSpecialPrize", 0);
if (!PlayerPrefs.HasKey("SpecialPrize")) PlayerPrefs.SetString("SpecialPrize", "5000р");
if (!PlayerPrefs.HasKey("Number")) PlayerPrefs.SetString("Number", "70000000000");
@ -527,7 +526,7 @@ public class GameManager : MonoBehaviour
{
if (Input.GetKeyDown(KeyCode.G))
{
PrizeSystem.GivePrize(new Prize(PrizeType.Hopper, 1));
PrizeSystemManager.GivePrize(PrizeUtils.CreatePrize(CountablePrizeType.Hopper, 1));
}
if (Input.GetKeyDown(KeyCode.O))
{

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ce51c8e33b734b4db6086586558c53a3
guid: 8b531827867089942ab06ffce707088a
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,60 +1,39 @@
using UnityEngine;
public class CheckState : IState
using PrizeSystem;
using UnityEngine;
public static class EndOfTurnHandler
{
GameManager gm;
bool timerWin;
CheckResult result;
public CheckState() : this(false)
{ }
public CheckState(bool timerWin)
private static GameManager gm;
private static CheckResult result;
public static void NormalHandling()
{
this.timerWin = timerWin;
result = timerWin ? new CheckResult(true, false, null) : GameManager.fieldModel.Check(GameManager.instance.currentPlayer);
result = GameManager.fieldModel.Check(GameManager.instance.currentPlayer);
gm = GameManager.instance;
gm.lastResult = result;
}
public void enter()
{
gm = GameManager.instance;
if (timerWin)
{
WinByTimerHandling();
}
else
{
NormalHandling();
}
}
void NormalHandling()
{
bool swipeToNextRightNow = false;
IState nextState;
//pvp решение победа в раунде или в игре
//pvp ðåøåíèå ïîáåäà â ðàóíäå èëè â èãðå
bool endround = result.End && !result.Draw;
bool endgame = false;
// подсчет очков
if (result.End)//Раунд окончен. Считаем очки и ставим стейт показ победителя
// ïîäñ÷åò î÷êîâ
if (result.End)//Ðàóíä îêîí÷åí. Ñ÷èòàåì î÷êè è ñòàâèì ñòåéò ïîêàç ïîáåäèòåëÿ
{
if (gm.gameMode == GameMode.pvp && !result.Draw)
{
//победил p1
//ïîáåäèë p1
if (gm.currentPlayer == CellState.Player1)
{
gm.player1score += 1;
gm.Player1Scale.SetMedalsCount(gm.player1score);
}
else//победил p2
else//ïîáåäèë p2
{
gm.player2score += 1;
gm.Player2Scale.SetMedalsCount(gm.player2score);
@ -70,16 +49,16 @@ public class CheckState : IState
AvatarEventBus.Instance.OnEndRound?.Invoke(gm.currentPlayer);
}
else if (gm.gameMode == GameMode.pve && !result.Draw) //конец раунда с ботом
else if (gm.gameMode == GameMode.pve && !result.Draw) //êîíåö ðàóíäà ñ áîòîì
{
//НЕ НИЧЬЯ
//ÍÅ ÍÈ×Üß
VictoryScale botScale = gm.botScale;
if (gm.currentPlayer == CellState.Player1)//[ПОБЕДА ИГРОКА]
if (gm.currentPlayer == CellState.Player1)//[ÏÎÁÅÄÀ ÈÃÐÎÊÀ]
{
if (CharacterController.CurrentCharacter.HasPrize)
{
PrizeSystem.GivePrize(CharacterController.CurrentCharacter.prize);
PrizeSystemManager.GivePrize(CharacterController.CurrentCharacter.prize);
CharacterController.CurrentCharacter.HasPrize = false;
}
@ -88,12 +67,12 @@ public class CheckState : IState
CharacterEventBus.Instance.OnPlayerWin?.Invoke();
LightUtility.Win();
CharacterController.CurrentCharacter.GetComponent<Animator>().SetTrigger("Lose");
CharacterController.CurrentCharacter.Animator.SetTrigger("Lose");
swipeToNextRightNow = true;
}
else//Бот победил
else//Áîò ïîáåäèë
{
LightUtility.Lose();
CharacterController.CurrentCharacter.GetComponent<Animator>().SetTrigger("Win");
@ -120,8 +99,8 @@ public class CheckState : IState
if (gm.gameMode == GameMode.pve && gm.vsBotScore == gm.botsAmount) gm.upgradeFeeshkaDifficulty();
//конец игры - призовое состояние
if (IsEndGame())
//êîíåö èãðû - ïðèçîâîå ñîñòîÿíèå
if (TotalWin())
{
nextState = new PrizeState();
ClearAllScales();
@ -137,36 +116,39 @@ public class CheckState : IState
gm.stateMachine.ChangeState(nextState);
}
private bool IsEndGame() =>
private static bool TotalWin() =>
gm.player1score == 5 || gm.player2score == 5 || gm.vsBotScore == gm.botsAmount;
void WinByTimerHandling()
public static void WinByTimerHandling()
{
//запустить проверку по полю
//Ïðè ïîáåäå ïî òàéìåðó:
//PVP ïðîèãðàë òîò, êòî íå óñïåë êèíóòü ôèøêó
//PVE - ïðîãðûâàåò ÷åëîâåê
result = new CheckResult(true, false, null);
IState nextState;
if (gm.gameMode == GameMode.pvp && !result.Draw)
if (gm.gameMode == GameMode.pvp)
{
//p2 не успел
//p2 íå óñïåë
if (gm.currentPlayer == CellState.Player2)
{
gm.player1score += 1;
gm.Player1Scale.SetMedalsCount(gm.player1score);
}
else//p1 не успел
else//p1 íå óñïåë
{
gm.player2score += 1;
gm.Player2Scale.SetMedalsCount(gm.player2score);
}
}
else if (gm.gameMode == GameMode.pve && !result.Draw)//время вышло при игре с ботом - бот победил
else if (gm.gameMode == GameMode.pve)//âðåìÿ âûøëî ïðè èãðå ñ áîòîì - áîò ïîáåäèë
{
LightUtility.Lose();
CharacterController.CurrentCharacter.GetComponent<Animator>().SetTrigger("Win");
//НЕ НИЧЬЯ
//ÍÅ ÍÈ×Üß
VictoryScale vsBotScale = gm.botScale;
DifficultyManager.instance.DecreaseDifficulty();
CharacterEventBus.Instance.OnBotWin?.Invoke();
@ -177,8 +159,8 @@ public class CheckState : IState
nextState = new ShowWinnerState(result);
//конец игры - призовое состояние
if (IsEndGame())
//êîíåö èãðû - ïðèçîâîå ñîñòîÿíèå
if (TotalWin())
{
nextState = new PrizeState();
ClearAllScales();
@ -187,19 +169,10 @@ public class CheckState : IState
gm.stateMachine.ChangeState(nextState);
}
private void ClearAllScales()
private static void ClearAllScales()
{
if (gm.botScale.isActiveAndEnabled) gm.botScale.ClearScale();
if (gm.Player1Scale.isActiveAndEnabled) gm.Player1Scale.ClearScale();
if (gm.Player2Scale.isActiveAndEnabled) gm.Player2Scale.ClearScale();
}
public void exit()
{
}
public void update()
{
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d8bcfb54aa19ee94294b1150bad880be
guid: c1351470acd7ef14eb5cadc554ecf3cd
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -373,4 +373,18 @@ public class COMinput : InputSource
Debug.Log($"{mapping.Key} -> Физический пин {mapping.Value}");
}
}
public override bool AnyButton()
{
//отсекаем датчики
for (int i = 0; i < pinMappings.Count - 2; i++)
{
if (buttonState[i])
{
return true;
}
}
return false;
}
}

View File

@ -40,7 +40,7 @@ public static class ComWrapper
AvailablePorts = availablePorts;
if (_lifetimeCts != null) return;
OpenPort(AvailablePorts);
_ = OpenPort(AvailablePorts);
if (h <= 0)
{
Log("Порт не открылся при инициализации");

View File

@ -97,4 +97,6 @@ public class In : MonoBehaviour
/// <summary>Проверяет завершение действия текущим игроком в текущем кадре</summary>
public static bool GetButtonUpCurrentPlayer(PlayerAction button) => source.GetButtonUpCurrentPlayer(button);
public static bool AnyButton() => source.AnyButton();
}

View File

@ -114,4 +114,6 @@ public abstract class InputSource
/// <param name="button">Абстрактное игровое действие</param>
/// <returns>true если действие завершено текущим игроком в этом кадре</returns>
public abstract bool GetButtonUpCurrentPlayer(PlayerAction button);
public abstract bool AnyButton();
}

View File

@ -172,4 +172,9 @@ public class KeyboardInput : InputSource
_ => KeyCode.None, // невалидный индекс
};
}
public override bool AnyButton()
{
return Input.anyKey;
}
}

View File

@ -1,4 +1,5 @@
using UnityEngine;
using PrizeSystem;
using UnityEngine;
using UnityEngine.Events;
/// <summary>
@ -57,8 +58,8 @@ public static class SingleWallet
PlayerPrefs.SetInt("CoinsCount", Balance);
//Счетчики выручки
PlayerPrefs.SetInt(PrizeSystem.key_cash, PlayerPrefs.GetInt(PrizeSystem.key_cash) + recieved);
PlayerPrefs.SetInt(PrizeSystem.key_cashNul, PlayerPrefs.GetInt(PrizeSystem.key_cashNul) + recieved);
PlayerPrefs.SetInt(PrizeSystemManager.key_cash, PlayerPrefs.GetInt(PrizeSystemManager.key_cash) + recieved);
PlayerPrefs.SetInt(PrizeSystemManager.key_cashNul, PlayerPrefs.GetInt(PrizeSystemManager.key_cashNul) + recieved);
if (SettingsManager.GetString("BaseBotDifficulty", "Фиксированная") == "Повышенная")
{

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b63e0053080646b9819789bf3bf9fa17
guid: 889c2d6861c566b49a237949c785d6c9
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -0,0 +1,179 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace PrizeSystem
{
public class CharacterPrizeConfigurator : MonoBehaviour
{
[SerializeField] TypeSelectionPanel typePanel;
[SerializeField] PrizeSettingPanel prizePanel;
[SerializeField] CharacterSelectionPanel characterPanel;
[SerializeField] List<GameObject> controlPanels;
[SerializeField] private Color AccentColor;
int controlIndex = 0;
bool readyToWork = false;
float exitTimer = 0;
private GameObject SelectedPanel => controlPanels[controlIndex];
IControl SelectedControl => SelectedPanel.GetComponent<IControl>();
private List<Prize> prizesCache;
private Coroutine BlinkCoroutine;
private void OnEnable()
{
readyToWork = false;
controlIndex = 0;
SetupPanels();
prizesCache = PrizeSerializer.LoadPrizes();
Debug.Log($"Загружены призы: \n{PrizeSerializer.SerializePrizes(prizesCache)}");
prizePanel.SetPanelByPrize(prizesCache[characterPanel.CharacterIndex]);
typePanel.SetType(prizesCache[0].PrizeType);
typePanel.OnTypeChanged += TypePanel_OnTypeChanged;
characterPanel.BeforeCharacterChange += CharacterPanel_BeforeCharacterChange;
characterPanel.OnCharacterChanged += CharacterPanel_OnCharacterChanged;
}
private void OnDisable()
{
typePanel.OnTypeChanged -= TypePanel_OnTypeChanged;
characterPanel.OnCharacterChanged -= CharacterPanel_OnCharacterChanged;
LightOnPanel(false);
}
private void TypePanel_OnTypeChanged(PrizeType newType)
{
prizePanel.SetPanelByType(newType);
}
private void CharacterPanel_BeforeCharacterChange(Character oldCharacter)
{
prizesCache[characterPanel.CharacterIndex] = prizePanel.GetPrize();
}
private void CharacterPanel_OnCharacterChanged(Character character)
{
Prize prize = prizesCache[characterPanel.CharacterIndex];
typePanel.SetType(prize.PrizeType);
prizePanel.SetPanelByPrize(prize);
}
#region ОБРАБОТКА ВВОДА
private void Update()
{
if (readyToWork)
{
var input = GetInputs();
if (input.Direction != 0) SelectedControl.Swipe(input.Direction);
if (input.Switch) SelectedControl.Switch();
if (input.NextPanel) NextPanel();
SaveProcessing(input.HoldSave);
}
else
{
if(!In.AnyButton()) readyToWork = true;
}
}
private (int Direction, bool Switch, bool NextPanel, bool HoldSave) GetInputs()
{
int Direction = 0;
if (In.GetButtonAnyPlayer(PlayerAction.right)) Direction += 1;
if (In.GetButtonAnyPlayer(PlayerAction.left)) Direction -= 1;
bool Switch = In.GetButtonDown(ButtonPinMapping.down1);
bool NextPanel = In.GetButtonDown(ButtonPinMapping.down2);
bool HoldExit = In.GetButton(ButtonPinMapping.startOnePlayer) && In.GetButton(ButtonPinMapping.startTwoPlayers);
return (Direction, Switch, NextPanel, HoldExit);
}
#endregion
private void NextPanel()
{
LightOnPanel(false);
controlIndex = (controlIndex + 1 + controlPanels.Count) % controlPanels.Count;
LightOnPanel(true);
}
private void LightOnPanel(bool on)
{
if (on && SelectedPanel.TryGetComponent<Graphic>(out var graphic))
{
BlinkCoroutine = StartCoroutine(BlinkAnimation(graphic));
}
else
{
StopCoroutine(BlinkCoroutine);
BlinkCoroutine = null;
SelectedPanel.GetComponent<Graphic>().color = Color.black;
}
}
//вероятно это будет единственный метод для обновления.
private void SetupPanels()
{
LightOnPanel(true);
}
private void SaveProcessing(bool HoldSave)
{
if (HoldSave) exitTimer += Time.deltaTime;
else exitTimer -= Time.deltaTime;
exitTimer = Mathf.Clamp(exitTimer, 0f, 2f);
if (exitTimer >= 2)
{
exitTimer = 0;
Save();
Exit();
}
}
private void Save()
{
//Кэшнуть текущего персонажа
prizesCache[characterPanel.CharacterIndex] = prizePanel.GetPrize();
PrizeSerializer.SavePrizes(prizesCache);
CharacterController.I.RefreshPrizes();
}
private void Exit()
{
GameManager.instance.stateMachine.ChangeState(new SettingsState());
}
IEnumerator BlinkAnimation(Graphic graphic)
{
while (true)
{
graphic.color = Vector4.Lerp(AccentColor, Color.black, Mathf.PingPong(Time.time, 1));
yield return null;
}
}
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7f422cd1388b01047a58cd07c7a23d9d
guid: 1633b67f26cca8d4083a85f85b6bbde4
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -0,0 +1,56 @@
using System;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class CharacterSelectionPanel : MonoBehaviour, IControl
{
public event Action<Character> BeforeCharacterChange;
public event Action<Character> OnCharacterChanged;
[SerializeField] TextMeshProUGUI CharacterNameLabel;
[SerializeField] Image CharacterIcon;
[SerializeField] float ChangeCharacterInterval = 0.15f;
private float LastSwipeTime = 0;
private Character[] characters;
public int CharacterIndex { get; private set; }
public int CharactersCount => characters.Length;
public Character SelectedCharacter => characters[CharacterIndex];
private bool CanSwipe => Time.time - LastSwipeTime > ChangeCharacterInterval;
private void OnEnable()
{
characters = CharacterController.I.characters;
CharacterIndex = 0;
DisplaySelectedCharacter();
}
public void Swipe(int direction)
{
if (CanSwipe)
{
BeforeCharacterChange?.Invoke(SelectedCharacter);
CharacterIndex = (CharacterIndex + direction + CharactersCount) % CharactersCount;
DisplaySelectedCharacter();
OnCharacterChanged?.Invoke(SelectedCharacter);
LastSwipeTime = Time.time;
}
}
public void Switch() { }
private void DisplaySelectedCharacter()
{
CharacterNameLabel.text = SelectedCharacter.Name;
CharacterIcon.sprite = SelectedCharacter.Icon;
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7b16dd500c6393045a637f0309da1cb0
guid: 852fdedcfe3484442b0d7e16ba459a3b
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -0,0 +1,14 @@
public interface IControl
{
/// <summary>
/// Для передачи сигнала "Листать". Выбор следующего пункта.
/// </summary>
public void Switch();
/// <summary>
/// Контракт для передачи в элемент управления направления взаимодействия
/// </summary>
/// <param name="direction">Направление взаимодействия. Предполагается -1, 0 или 1</param>
public void Swipe(int direction);
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7db527163aec4d84e894854bc9508ce2
guid: b76d8a33e9c614948aeeea94d198e6e7
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace PrizeSystem
{
public class PrizeSettingPanel : MonoBehaviour, IControl
{
[SerializeField] AbstractPrizeConfigurator CurrentConfigurator;
[SerializeField] List<PrizeTypeToPanelMap> prizeTypeToPanelMaps;
private void Update() => CurrentConfigurator?.Tick();
public void Swipe(int direction) => CurrentConfigurator?.Swipe(direction);
public void Switch() => CurrentConfigurator?.ChangeOption(1);
public AbstractPrizeConfigurator SetPanelByType(PrizeType newType)
{
GameObject newPanel;
try
{
PrizeTypeToPanelMap pttp = prizeTypeToPanelMaps.Where(t => t.Type == newType).First();
newPanel = pttp.Panel;
}
catch
{
Debug.LogError("Íå íàøåë ïàíåëü ïî òèïó. Âåðîÿòíî ìàïèíã íå çàïîëíåí", this);
return null;
}
if (transform.childCount > 0)
{
Destroy(transform.GetChild(0).gameObject);
}
var go = Instantiate(newPanel, transform);
if(go.TryGetComponent<AbstractPrizeConfigurator>(out var prizeConfigConfigurator))
{
CurrentConfigurator = prizeConfigConfigurator;
}
else
{
CurrentConfigurator = null;
}
return CurrentConfigurator;
}
public void SetPanelByPrize(Prize prize)
{
var panel = SetPanelByType(prize.PrizeType);
panel.Configure(prize);
//Êîíôèãóðèðîâàòü ïàíåëü
}
public Prize GetPrize() => CurrentConfigurator.GetPrize();
[Serializable]
public struct PrizeTypeToPanelMap
{
public PrizeType Type;
public GameObject Panel;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b4ba5f9c3fce41d4fb461bf7f99436ea
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,51 @@
using System;
using TMPro;
using UnityEngine;
namespace PrizeSystem{
public class TypeSelectionPanel : MonoBehaviour, IControl
{
public event Action<PrizeType> OnTypeChanged;
[SerializeField] TextMeshProUGUI TypeNameLabel;
[SerializeField] float ChangeTypeInterval = 0.15f;
private int index = 0;
private float LastSwipeTime = 0;
private Array PrizeTypes = Enum.GetValues(typeof(PrizeType));
public PrizeType SelectedType => (PrizeType)PrizeTypes.GetValue(index);
private bool CanSwipe => Time.time - LastSwipeTime > ChangeTypeInterval;
private void OnEnable()
{
RefresfUI();
}
public void Swipe(int direction)
{
if (CanSwipe)
{
index = (index + direction + PrizeTypes.Length) % PrizeTypes.Length;
RefresfUI();
OnTypeChanged?.Invoke(SelectedType);
LastSwipeTime = Time.time;
}
}
private void RefresfUI()
{
TypeNameLabel.text = PrizeUtils.PrizeTypeToString(SelectedType);
}
public void Switch() { }
public void SetType(PrizeType newType)
{
index = Array.IndexOf(PrizeTypes, newType);
RefresfUI();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 44737d5085219c94ba7fe1b47bc88a35
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: 0851605490a599b46b6ac5cb681d93ea
guid: 25ee4e46a393d0a48b4f6bdc43f33750
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,13 @@
using UnityEngine;
namespace PrizeSystem
{
public abstract class AbstractPrizeConfigurator : MonoBehaviour
{
public abstract void Configure(Prize prize);
public abstract void Swipe(int direction);//íàñòðîéêà êàêîé òî ñòðîêè
public abstract void ChangeOption(int direction); //ïåðåêëþ÷åíèå ìåæäó òàêèìè ñòðîêàìè
public abstract void Tick(); //âûçîâ èç update
public abstract Prize GetPrize();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dfebd30936dcfda41aac1e5cf6617446
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,87 @@
using TMPro;
using UnityEngine;
namespace PrizeSystem
{
public class CountedPrizeInput : AbstractPrizeConfigurator
{
[SerializeField] private CountablePrizeType Type;
[SerializeField] private TextMeshProUGUI ValueLabel;
[SerializeField] private int Min;
[SerializeField] private int Max;
[SerializeField] private float MinDelay;
[SerializeField] private float MaxDelay;
[SerializeField] private float Acceleration;
[SerializeField] AudioClip SwitchClip;
private float Delay;//äëÿ òåñòà ñåðèàëèçîâàíî
private int Value;
private float LastSwipeTime = 0;
bool CanSwipe => Time.time - LastSwipeTime > Delay;
private void OnEnable()
{
Value = Min;
Display();
}
public override void Configure(Prize prize)
{
if (prize is CountablePrize countablePrize)
{
Value = countablePrize.Amount;
Display();
}
}
public void Display()
{
ValueLabel.text = Value.ToString();
}
public override void ChangeOption(int direction) { }
public override void Swipe(int direction)
{
if (CanSwipe)
{
if(Value+direction> Min && Value+direction< Max)
{
if(SwitchClip != null) SoundManager.instance.playClip(SwitchClip);
}
Value += direction;
Value = Mathf.Clamp(Value, Min, Max);
Display();
LastSwipeTime = Time.time;
}
}
public override void Tick()
{
bool left = In.GetButtonAnyPlayer(PlayerAction.left);
bool right= In.GetButtonAnyPlayer(PlayerAction.right);
if(!(left || right))
{
Delay = MaxDelay;
LastSwipeTime = 0;
}
else
{
Delay = Mathf.Clamp(Delay - Acceleration*Time.deltaTime, MinDelay, MaxDelay);
}
}
public override Prize GetPrize() => PrizeUtils.CreatePrize(Type, Value);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1d122719b3a479e45bb1c5b323c27538
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,28 @@
namespace PrizeSystem
{
public class NonePrizeInput : AbstractPrizeConfigurator
{
public override void ChangeOption(int direction)
{
}
public override void Configure(Prize prize)
{
if (prize.PrizeType == PrizeType.None)
{
//ëîãèêà ñòàðòîâîé ðàññòàíîâêè.
}
}
public override Prize GetPrize() => PrizeUtils.CreatePrize();
public override void Swipe(int direction)
{
}
public override void Tick()
{
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8a16922ec5b27584fa3d9f987879a29f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 67355b5fc7b7d4f429c27c1d51bf115f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,587 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &38453762234509768
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1863259091651382891}
- component: {fileID: 6792223412470574237}
- component: {fileID: 3745626805572842814}
m_Layer: 5
m_Name: value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1863259091651382891
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 38453762234509768}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3556855010643383530}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6792223412470574237
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 38453762234509768}
m_CullTransparentMesh: 1
--- !u!114 &3745626805572842814
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 38453762234509768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435\n"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &447136773418432813
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2814087333351310132}
- component: {fileID: 4442287442523176364}
- component: {fileID: 4876836118556456638}
- component: {fileID: 8785146164364137309}
m_Layer: 5
m_Name: pointer1.1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2814087333351310132
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 447136773418432813}
m_LocalRotation: {x: -0, y: -0, z: 1, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3556855010643383530}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -131, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4442287442523176364
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 447136773418432813}
m_CullTransparentMesh: 1
--- !u!114 &4876836118556456638
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 447136773418432813}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: aa46adafa643d084abe86ac0f3697446, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8785146164364137309
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 447136773418432813}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a75daa31c0bc7ab44a93c4c613ce8c13, type: 3}
m_Name:
m_EditorClassIdentifier:
amplitude: 0.5
speed: 7
--- !u!1 &1212762075965303987
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1734522777821588971}
- component: {fileID: 9134652381621188910}
- component: {fileID: 1996942080093153493}
m_Layer: 5
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1734522777821588971
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 161}
m_SizeDelta: {x: 400, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9134652381621188910
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_CullTransparentMesh: 1
--- !u!114 &1996942080093153493
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u041F\u0435\u0440\u0432\u044B\u0439 \u0445\u043E\u043F\u043F\u0435\u0440"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3035189632964575392
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5510025155540528801}
- component: {fileID: 5836337586633069795}
m_Layer: 5
m_Name: Hopper1PrizeSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5510025155540528801
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1734522777821588971}
- {fileID: 3556855010643383530}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5836337586633069795
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1d122719b3a479e45bb1c5b323c27538, type: 3}
m_Name:
m_EditorClassIdentifier:
Type: 0
ValueLabel: {fileID: 3745626805572842814}
Min: 1
Max: 5
MinDelay: 0
MaxDelay: 0.5
Acceleration: 0.4
SwitchClip: {fileID: 8300000, guid: 1c48900c9ab0aa8418920a8193050870, type: 3}
Delay: 0
--- !u!1 &4306772402233291670
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3556855010643383530}
- component: {fileID: 2051494981362569546}
- component: {fileID: 2626796383001821636}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3556855010643383530
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4306772402233291670}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1863259091651382891}
- {fileID: 8571426388678586768}
- {fileID: 2814087333351310132}
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2051494981362569546
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4306772402233291670}
m_CullTransparentMesh: 1
--- !u!114 &2626796383001821636
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4306772402233291670}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0.5568628, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 1744797893, guid: 93e5f9833bed0474cb1481410d00191c, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7919714672171764590
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8571426388678586768}
- component: {fileID: 3858094292437953973}
- component: {fileID: 771610648025983804}
- component: {fileID: 5061827067091940149}
m_Layer: 5
m_Name: pointer1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8571426388678586768
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7919714672171764590}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3556855010643383530}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 131, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3858094292437953973
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7919714672171764590}
m_CullTransparentMesh: 1
--- !u!114 &771610648025983804
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7919714672171764590}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: aa46adafa643d084abe86ac0f3697446, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5061827067091940149
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7919714672171764590}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a75daa31c0bc7ab44a93c4c613ce8c13, type: 3}
m_Name:
m_EditorClassIdentifier:
amplitude: 0.5
speed: 7

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c91ca418487875248867a357b3427da4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,587 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1212762075965303987
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1734522777821588971}
- component: {fileID: 9134652381621188910}
- component: {fileID: 1996942080093153493}
m_Layer: 5
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1734522777821588971
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 161}
m_SizeDelta: {x: 400, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9134652381621188910
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_CullTransparentMesh: 1
--- !u!114 &1996942080093153493
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u0412\u0442\u043E\u0440\u043E\u0439 \u0445\u043E\u043F\u043F\u0435\u0440"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &1237472807604427610
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9081239041645680213}
- component: {fileID: 5763192209971549993}
- component: {fileID: 8768512066627871641}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9081239041645680213
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237472807604427610}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4249864224199403603}
- {fileID: 7106759770606526994}
- {fileID: 4094067544114615605}
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5763192209971549993
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237472807604427610}
m_CullTransparentMesh: 1
--- !u!114 &8768512066627871641
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237472807604427610}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0.5568628, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 1744797893, guid: 93e5f9833bed0474cb1481410d00191c, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &1378181508099005548
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7106759770606526994}
- component: {fileID: 4539313159340685643}
- component: {fileID: 4810864579745348832}
- component: {fileID: 7712376028326361768}
m_Layer: 5
m_Name: pointer1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7106759770606526994
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1378181508099005548}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9081239041645680213}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 131, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4539313159340685643
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1378181508099005548}
m_CullTransparentMesh: 1
--- !u!114 &4810864579745348832
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1378181508099005548}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: aa46adafa643d084abe86ac0f3697446, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &7712376028326361768
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1378181508099005548}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a75daa31c0bc7ab44a93c4c613ce8c13, type: 3}
m_Name:
m_EditorClassIdentifier:
amplitude: 0.5
speed: 7
--- !u!1 &1783989484412089087
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4094067544114615605}
- component: {fileID: 9017691598949215786}
- component: {fileID: 8205618303894684843}
- component: {fileID: 1283950635794217826}
m_Layer: 5
m_Name: pointer1.1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4094067544114615605
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1783989484412089087}
m_LocalRotation: {x: -0, y: -0, z: 1, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9081239041645680213}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -131, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9017691598949215786
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1783989484412089087}
m_CullTransparentMesh: 1
--- !u!114 &8205618303894684843
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1783989484412089087}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: aa46adafa643d084abe86ac0f3697446, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1283950635794217826
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1783989484412089087}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a75daa31c0bc7ab44a93c4c613ce8c13, type: 3}
m_Name:
m_EditorClassIdentifier:
amplitude: 0.5
speed: 7
--- !u!1 &3035189632964575392
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5510025155540528801}
- component: {fileID: 5836337586633069795}
m_Layer: 5
m_Name: Hopper2PrizeSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5510025155540528801
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 9081239041645680213}
- {fileID: 1734522777821588971}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5836337586633069795
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1d122719b3a479e45bb1c5b323c27538, type: 3}
m_Name:
m_EditorClassIdentifier:
Type: 1
ValueLabel: {fileID: 6945429551752555087}
Min: 1
Max: 5
MinDelay: 0
MaxDelay: 0.5
Acceleration: 0.4
SwitchClip: {fileID: 8300000, guid: 1c48900c9ab0aa8418920a8193050870, type: 3}
Delay: 0
--- !u!1 &4949548470842756604
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4249864224199403603}
- component: {fileID: 386558165808901920}
- component: {fileID: 6945429551752555087}
m_Layer: 5
m_Name: value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4249864224199403603
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4949548470842756604}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 9081239041645680213}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &386558165808901920
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4949548470842756604}
m_CullTransparentMesh: 1
--- !u!114 &6945429551752555087
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4949548470842756604}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435\n"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 14f3233b33583a747b1e8c523d93bc28
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,587 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1080149871215077286
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 343459148575588531}
- component: {fileID: 4942775146004530348}
- component: {fileID: 858394410254027197}
- component: {fileID: 783623910430623640}
m_Layer: 5
m_Name: pointer1.1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &343459148575588531
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080149871215077286}
m_LocalRotation: {x: -0, y: -0, z: 1, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2087039093029163493}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -131, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4942775146004530348
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080149871215077286}
m_CullTransparentMesh: 1
--- !u!114 &858394410254027197
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080149871215077286}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: aa46adafa643d084abe86ac0f3697446, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &783623910430623640
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1080149871215077286}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a75daa31c0bc7ab44a93c4c613ce8c13, type: 3}
m_Name:
m_EditorClassIdentifier:
amplitude: 0.5
speed: 7
--- !u!1 &1212762075965303987
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1734522777821588971}
- component: {fileID: 9134652381621188910}
- component: {fileID: 1996942080093153493}
m_Layer: 5
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1734522777821588971
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 161}
m_SizeDelta: {x: 400, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9134652381621188910
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_CullTransparentMesh: 1
--- !u!114 &1996942080093153493
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u041C\u0430\u0440\u0431\u043B\u0441"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &1811722393859998104
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2087039093029163493}
- component: {fileID: 7060973903902648956}
- component: {fileID: 8575748765746564460}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2087039093029163493
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1811722393859998104}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1294061059559307282}
- {fileID: 6837028212952028325}
- {fileID: 343459148575588531}
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7060973903902648956
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1811722393859998104}
m_CullTransparentMesh: 1
--- !u!114 &8575748765746564460
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1811722393859998104}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0.5568628, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 1744797893, guid: 93e5f9833bed0474cb1481410d00191c, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &3035189632964575392
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5510025155540528801}
- component: {fileID: 5836337586633069795}
m_Layer: 5
m_Name: MarblesPrizeSettings 3
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5510025155540528801
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2087039093029163493}
- {fileID: 1734522777821588971}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5836337586633069795
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1d122719b3a479e45bb1c5b323c27538, type: 3}
m_Name:
m_EditorClassIdentifier:
Type: 3
ValueLabel: {fileID: 1017378489144524705}
Min: 1
Max: 10
MinDelay: 0.15
MaxDelay: 0.5
Acceleration: 0
SwitchClip: {fileID: 8300000, guid: 1c48900c9ab0aa8418920a8193050870, type: 3}
Delay: 0
--- !u!1 &8121963000491084903
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6837028212952028325}
- component: {fileID: 5240337791472240176}
- component: {fileID: 4425215304372199339}
- component: {fileID: 2043268514966094814}
m_Layer: 5
m_Name: pointer1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6837028212952028325
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8121963000491084903}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2087039093029163493}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 131, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5240337791472240176
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8121963000491084903}
m_CullTransparentMesh: 1
--- !u!114 &4425215304372199339
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8121963000491084903}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: aa46adafa643d084abe86ac0f3697446, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &2043268514966094814
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8121963000491084903}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a75daa31c0bc7ab44a93c4c613ce8c13, type: 3}
m_Name:
m_EditorClassIdentifier:
amplitude: 0.5
speed: 7
--- !u!1 &8958735335545159662
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1294061059559307282}
- component: {fileID: 1013651401294540663}
- component: {fileID: 1017378489144524705}
m_Layer: 5
m_Name: value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1294061059559307282
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8958735335545159662}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2087039093029163493}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1013651401294540663
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8958735335545159662}
m_CullTransparentMesh: 1
--- !u!114 &1017378489144524705
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8958735335545159662}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435\n"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d6d91e3e6a02dd84b83779e8b7a8a8c0
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,186 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6989769607338401591
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3747875939631180351}
- component: {fileID: 4586024427495143311}
m_Layer: 5
m_Name: NonePrizeSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3747875939631180351
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6989769607338401591}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3621466791668314580}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &4586024427495143311
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6989769607338401591}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8a16922ec5b27584fa3d9f987879a29f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &7582072870501126864
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3621466791668314580}
- component: {fileID: 4444222262078130158}
- component: {fileID: 8118355822098981771}
m_Layer: 5
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3621466791668314580
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582072870501126864}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3747875939631180351}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 161}
m_SizeDelta: {x: 415.34, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4444222262078130158
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582072870501126864}
m_CullTransparentMesh: 1
--- !u!114 &8118355822098981771
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7582072870501126864}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u041F\u0440\u0438\u0437 \u0432\u044B\u0434\u0430\u0432\u0430\u0442\u044C\u0441\u044F
\u043D\u0435 \u0431\u0443\u0434\u0435\u0442"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 788ee2e28dfcfa64880dd5066f476de3
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dce6cd8d719bd6048876c7ffec86ea78
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,77 @@
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using UnityEngine.UI;
public class QrTextInput : MonoBehaviour
{
[SerializeField] private List<QrTextSlot> slots;
[SerializeField] private Image frame;
[TextArea][SerializeField] private string alphabet = "1";
private QrTextSlot CurrentSlot => slots[index];
private int index = 0;
private void OnEnable()
{
index = 0;
}
public void SwitchSlot(int direction)
{
CurrentSlot.SetActive(false);
index = (index + direction + slots.Count) % slots.Count;
CurrentSlot.SetActive(true);
}
public void SwitchLetter(int direction)
{
int currentLetterIndex = alphabet.IndexOf(CurrentSlot.GetText());
if (currentLetterIndex != -1)
{
currentLetterIndex = (currentLetterIndex + direction + alphabet.Length) % alphabet.Length;
CurrentSlot.SetText(alphabet[currentLetterIndex].ToString());
}
else
{
currentLetterIndex = 0;
CurrentSlot.SetText(alphabet[0].ToString());
}
}
public string GetText()
{
var sb = new StringBuilder();
foreach (var slot in slots)
{
sb.Append(slot.GetText());
}
return sb.ToString().Trim();
}
public void SetText(string text)
{
if(text.Length > slots.Count)
{
text = text.Substring(0, slots.Count - 1);
}
int min = Mathf.Min(text.Length, slots.Count);
for (int i = 0; i < min; i++)
{
slots[i].SetText(text[i].ToString());
}
}
public void Light(Color color)
{
frame.color = color;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 58453d58747223844aefb103a3ec98c3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,20 @@
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class QrTextSlot : MonoBehaviour
{
[SerializeField] private Color NormalColor;
[SerializeField] private Color HighlightedColor;
[SerializeField] private Image image;
[SerializeField] private TextMeshProUGUI label;
private void OnEnable() => SetActive(false);
public void SetText(string text) => label.text = text;
public string GetText() => label.text;
public void SetActive(bool on) => image.color = on ? HighlightedColor : NormalColor;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fe44f586cc602d640a51afa5febde3ef
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,587 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1212762075965303987
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1734522777821588971}
- component: {fileID: 9134652381621188910}
- component: {fileID: 1996942080093153493}
m_Layer: 5
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1734522777821588971
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 161}
m_SizeDelta: {x: 400, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9134652381621188910
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_CullTransparentMesh: 1
--- !u!114 &1996942080093153493
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u0422\u0438\u043A\u0435\u0442\u044B"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &1822928842127306984
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1349375949234202931}
- component: {fileID: 3564701211131818666}
- component: {fileID: 3899086292002764626}
m_Layer: 5
m_Name: value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1349375949234202931
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1822928842127306984}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8807959680437675495}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3564701211131818666
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1822928842127306984}
m_CullTransparentMesh: 1
--- !u!114 &3899086292002764626
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1822928842127306984}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435\n"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3035189632964575392
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5510025155540528801}
- component: {fileID: 5836337586633069795}
m_Layer: 5
m_Name: TicketPrizeSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5510025155540528801
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8807959680437675495}
- {fileID: 1734522777821588971}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5836337586633069795
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1d122719b3a479e45bb1c5b323c27538, type: 3}
m_Name:
m_EditorClassIdentifier:
Type: 2
ValueLabel: {fileID: 3899086292002764626}
Min: 1
Max: 100
MinDelay: 0
MaxDelay: 0.5
Acceleration: 0.2
SwitchClip: {fileID: 8300000, guid: 1c48900c9ab0aa8418920a8193050870, type: 3}
Delay: 0
--- !u!1 &5030279612583269179
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1709062762304502896}
- component: {fileID: 4780312670299678193}
- component: {fileID: 5575681842661771960}
- component: {fileID: 5077526487300056866}
m_Layer: 5
m_Name: pointer1.1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1709062762304502896
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5030279612583269179}
m_LocalRotation: {x: -0, y: -0, z: 1, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8807959680437675495}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -131, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4780312670299678193
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5030279612583269179}
m_CullTransparentMesh: 1
--- !u!114 &5575681842661771960
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5030279612583269179}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: aa46adafa643d084abe86ac0f3697446, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5077526487300056866
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5030279612583269179}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a75daa31c0bc7ab44a93c4c613ce8c13, type: 3}
m_Name:
m_EditorClassIdentifier:
amplitude: 0.5
speed: 7
--- !u!1 &8396501730237861390
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2179082286156255929}
- component: {fileID: 332738419750672119}
- component: {fileID: 265119501892094814}
- component: {fileID: 3592285478564925182}
m_Layer: 5
m_Name: pointer1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2179082286156255929
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8396501730237861390}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8807959680437675495}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 131, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &332738419750672119
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8396501730237861390}
m_CullTransparentMesh: 1
--- !u!114 &265119501892094814
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8396501730237861390}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: aa46adafa643d084abe86ac0f3697446, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &3592285478564925182
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8396501730237861390}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a75daa31c0bc7ab44a93c4c613ce8c13, type: 3}
m_Name:
m_EditorClassIdentifier:
amplitude: 0.5
speed: 7
--- !u!1 &8579880269546577152
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8807959680437675495}
- component: {fileID: 6144685874972836938}
- component: {fileID: 5296188908559982421}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8807959680437675495
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8579880269546577152}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1349375949234202931}
- {fileID: 2179082286156255929}
- {fileID: 1709062762304502896}
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6144685874972836938
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8579880269546577152}
m_CullTransparentMesh: 1
--- !u!114 &5296188908559982421
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8579880269546577152}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0.5568628, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 1744797893, guid: 93e5f9833bed0474cb1481410d00191c, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 40584709bd1bea24e8e0c1ed5d0d6cce
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,327 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &202777072447553038
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 905256846402403460}
- component: {fileID: 3307988586989954438}
m_Layer: 5
m_Name: Content
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &905256846402403460
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 202777072447553038}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -100}
m_SizeDelta: {x: -200, y: 696.26}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &3307988586989954438
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 202777072447553038}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: -30
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &1212762075965303987
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1734522777821588971}
- component: {fileID: 9134652381621188910}
- component: {fileID: 1996942080093153493}
m_Layer: 5
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1734522777821588971
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -50}
m_SizeDelta: {x: 400, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9134652381621188910
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_CullTransparentMesh: 1
--- !u!114 &1996942080093153493
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1212762075965303987}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u041F\u0440\u0438\u0437\u043E\u0432\u0430\u044F \u0432\u0438\u0442\u0440\u0438\u043D\u0430"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3035189632964575392
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5510025155540528801}
- component: {fileID: -411737518629257653}
m_Layer: 5
m_Name: VitrinaPrizeSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5510025155540528801
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1734522777821588971}
- {fileID: 905256846402403460}
- {fileID: 7754005565347381640}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &-411737518629257653
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3035189632964575392}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9e8ac40472255264fac351c49aa5a62c, type: 3}
m_Name:
m_EditorClassIdentifier:
Content: {fileID: 905256846402403460}
TogglePrefab: {fileID: 1876997734204608492, guid: fe164a79739075f429d761ca69f8849e, type: 3}
Pointer: {fileID: 7754005565347381640}
--- !u!1 &3967834049323493430
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7754005565347381640}
- component: {fileID: 2264651807551816401}
- component: {fileID: 3759129218107271575}
m_Layer: 5
m_Name: Pointer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7754005565347381640
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3967834049323493430}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5510025155540528801}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 50, y: 50}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 1, y: 1}
--- !u!222 &2264651807551816401
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3967834049323493430}
m_CullTransparentMesh: 1
--- !u!114 &3759129218107271575
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3967834049323493430}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: aa46adafa643d084abe86ac0f3697446, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2081411d8dd2e094c8b6d69d39727a10
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: fe164a79739075f429d761ca69f8849e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,96 @@
using UnityEngine;
using TMPro;
using UnityEngine.UI;
namespace PrizeSystem
{
//TODO ïðèêëàìïèòü ðàíã íà ñòàðòå
public class QrPrizeInput : AbstractPrizeConfigurator
{
[SerializeField] private Image rankImage;
[SerializeField] private TextMeshProUGUI rankLabel;
[SerializeField] private QrTextInput textInput;
[SerializeField] private Color AccentColor;
private int rank = 1;
private SelectedOption currentOption = SelectedOption.Rank;
private void OnEnable()
{
currentOption = SelectedOption.Rank;
textInput.Light(Color.black);
rankImage.color = AccentColor;
Display();
}
public override void Configure(Prize prize)
{
if (prize is QrPrize qr)
{
rank = qr.Rank;
textInput.SetText(qr.PrizeText);
Display();
}
}
public override void ChangeOption(int direction)
{
//Ñìåíà îïöèè
if (currentOption == SelectedOption.Rank) currentOption = SelectedOption.Text;
else if ((currentOption == SelectedOption.Text)) currentOption = SelectedOption.Rank;
if (currentOption == SelectedOption.Rank)
{
textInput.Light(Color.black);
rankImage.color = AccentColor;
}
else if (currentOption == SelectedOption.Text)
{
textInput.Light(AccentColor);
rankImage.color = Color.black;
}
}
public override void Swipe(int direction)
{
if (currentOption == SelectedOption.Rank)
{
rank = Mathf.Clamp(rank + direction, 1, GameManager.instance.botsAmount);
Display();
}
else if (currentOption == SelectedOption.Text)
{
int leftDirection = 0;
if (In.GetButtonDown(ButtonPinMapping.left1)) leftDirection -= 1;
if (In.GetButtonDown(ButtonPinMapping.right1)) leftDirection += 1;
int rightDirection = 0;
if (In.GetButtonDown(ButtonPinMapping.left2)) rightDirection -= 1;
if (In.GetButtonDown(ButtonPinMapping.right2)) rightDirection += 1;
//ÒÅÏÅÐÜ ÍÀÄÎ ÂÎÒ ÝÒÈ ÈÍÏÓÒÛ ÏÐÎÊÈÍÓÒÜ ÄÀËÜØÅ
textInput.SwitchLetter(leftDirection);
textInput.SwitchSlot(rightDirection);
}
}
public override Prize GetPrize() => PrizeUtils.CreatePrize(rank, textInput.GetText());
public override void Tick() { }
private void Display()
{
rankLabel.text = rank.ToString();
//Òàê æå íóæíî äîï èíôó ïî ìåäàëÿì
}
enum SelectedOption { Rank, Text }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 28f30551e8617e749ba9e39e4cd836bc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,71 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
public class Toggle : MonoBehaviour
{
[SerializeField] private List<Graphic> ToggleGraphics;
[SerializeField] private RectTransform ToggleRect;
[SerializeField] private Color EnabledColor = new Vector4(1, 1, 1, 1);
[SerializeField] private Color DisabledColor = new Vector4(0.5f, 0.5f, 0.5f, 1);
[SerializeField] private Vector2 EnabledPosition;
[SerializeField] private Vector2 DisabledPosition;
[SerializeField] private AudioClip EnableSound;
[SerializeField] private AudioClip DisableSound;
[SerializeField] private float speed = 500f;
bool value = true;
public UnityEvent OnChangeReady { get; }
private Coroutine coroutine;
public void SetValue(bool newValue, bool sounded)
{
if (newValue == value) return;
value = newValue;
StopAllCoroutines();
StartCoroutine(Display(value, speed, sounded: sounded));
}
IEnumerator Display(bool value, float movespeed, bool sounded)
{
Vector2 targetPosition = value ? EnabledPosition : DisabledPosition;
Vector2 startPosition = value ? DisabledPosition : EnabledPosition;
Vector4 targetColor = value ? EnabledColor : DisabledColor;
Color startColor = ToggleGraphics[0].color;
if (sounded)
{
AudioClip clip = value ? EnableSound : DisableSound;
SoundManager.instance.playClip(clip);
}
while (ToggleRect.anchoredPosition != targetPosition)
{
ToggleRect.anchoredPosition = Vector2.MoveTowards(ToggleRect.anchoredPosition, targetPosition, Time.deltaTime * movespeed);
//öâåò
float t = Vector2.Distance(ToggleRect.anchoredPosition, startPosition) / Vector2.Distance(startPosition, targetPosition);
Color color = ToggleGraphics[0].color;
color = Vector4.Lerp(startColor, targetColor, t);
foreach (Graphic g in ToggleGraphics)
{
g.color = targetColor;
}
yield return null;
}
coroutine = null;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 130ab0d499f886345850a25d76753a7b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,105 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace PrizeSystem
{
public class VitrinaPrizeInput : AbstractPrizeConfigurator
{
[SerializeField] private RectTransform Content;
[SerializeField] private GameObject TogglePrefab;
[SerializeField] RectTransform Pointer;
private List<VitrinaToggle> toggles;
private int index = 0;
private const int BoxesCount = 5;
private int[] boxes;
public override void ChangeOption(int direction)
{
index = (index + 1 + BoxesCount) % BoxesCount;
SetPointerToCurrentToggle();
}
public override void Configure(Prize prize)
{
if (prize is VitrinaPrize vitrinaPrize)
{
boxes = vitrinaPrize.Boxes.ToArray();
for (int i = 0; i < BoxesCount; i++)
{
if (boxes.Contains(i+1))
{
toggles[i].SetValue(true);
}
else
{
toggles[i].SetValue(false);
}
}
}
}
private void OnEnable()
{
index = 0;
toggles = new();
for (int i = 0; i < BoxesCount; i++)
{
var go = Instantiate(TogglePrefab, Content);
if (go.TryGetComponent<VitrinaToggle>(out var toggle))
{
toggle.Configure($"ß÷åéêà {i + 1}:", false);
toggles.Add(toggle);
}
else
{
Debug.LogError("Íåò êîìïîíåíòà íà ïðåôàáå òîããëà.");
}
}
if(toggles.Count > 0) SetPointerToCurrentToggle();
}
void SetPointerToCurrentToggle()
{
RectTransform activeElement = Content.GetChild(index).GetComponent<RectTransform>();
Pointer.position = activeElement.position;
}
private void OnDisable()
{
foreach (var toggle in toggles)
{
Destroy(toggle.gameObject);
}
toggles.Clear();
}
public override Prize GetPrize()
{
List<int> boxNumbers = new List<int>();
for (int i = 0;i < toggles.Count; i++)
if (toggles[i].State)
boxNumbers.Add(i+1);
return PrizeUtils.CreatePrize(boxNumbers.ToArray());
}
public override void Swipe(int direction)
{
bool value = direction > 0 ? true : false;
toggles[index].SetValue(value);
}
public override void Tick()
{
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9e8ac40472255264fac351c49aa5a62c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
using TMPro;
using UnityEngine;
namespace PrizeSystem
{
public class VitrinaToggle : MonoBehaviour
{
[SerializeField] private TextMeshProUGUI label;
[SerializeField] private Toggle toggle;
public bool State { get; private set; }
public void Configure(string Name, bool value)
{
label.text = Name;
State = value;
toggle.SetValue(value, sounded: false);
}
public void SetValue(bool value)
{
State = value;
toggle.SetValue(value, sounded: true);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2334cf14138b01b44b564f74ec85c700
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,18 +0,0 @@
[System.Serializable]
public class Prize
{
public PrizeType PrizeType;
public int Amount;
public Prize(PrizeType prizeType, int amount)
{
PrizeType = prizeType;
Amount = amount;
}
public override string ToString()
{
return $"{PrizeType}:{Amount}";
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: af89a88d9e41cf74a8f0f599f2947b95
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
namespace PrizeSystem
{
public class CountablePrize : Prize
{
public CountablePrizeType Type { get; private set; }
public int Amount { get;}
public override string Body => $"{Type}:{Amount}";
public CountablePrize(CountablePrizeType type, int amount) : base(PrizeUtils.CountableToGeneral(type))
{
Type = type;
Amount = amount;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0e647524dfc93b94086a7fcb6021453d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,11 @@
namespace PrizeSystem
{
public class EmptyPrize : Prize
{
public override string Body => "None";
public EmptyPrize() : base(PrizeType.None)
{ }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4539efb35ce051d4a87058fa057efd84
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,12 @@
namespace PrizeSystem
{
public abstract class Prize
{
public PrizeType PrizeType { get; }
public abstract string Body { get; }
protected Prize(PrizeType prizeType)
{
PrizeType = prizeType;
}
}
}

View File

@ -0,0 +1,58 @@
namespace PrizeSystem
{
public static class PrizeUtils
{
public static string PrizeTypeToString(PrizeType prizeType)
{
return prizeType switch
{
PrizeType.None => "Áåç ïðèçà",
PrizeType.Hopper => "Õîïïåð 1",
PrizeType.Hopper2 => "Õîïïåð 2",
PrizeType.Ticket => "Áèëåò",
PrizeType.Qr => "QR/Ñóïåðïðèç",
PrizeType.Marbles => "Ìàðáëñ",
PrizeType.VitrinaBox => "Âèòðèíà",
_ => "Áåç ïðèçà"
};
}
public static Prize CreatePrize() => new EmptyPrize();
public static Prize CreatePrize(CountablePrizeType prizeType, int Amount) => new CountablePrize(prizeType, Amount);
public static Prize CreatePrize(int[] boxes) => new VitrinaPrize(boxes);
public static Prize CreatePrize(int rank, string prizeText) => new QrPrize(rank, prizeText);
public static PrizeType CountableToGeneral(CountablePrizeType countableType)
{
return countableType switch
{
CountablePrizeType.Hopper => PrizeType.Hopper,
CountablePrizeType.Hopper2 => PrizeType.Hopper2,
CountablePrizeType.Ticket => PrizeType.Ticket,
CountablePrizeType.Marbles => PrizeType.Marbles,
_ => PrizeType.None
};
}
}
public enum PrizeType
{
None,
Hopper,
Hopper2,
Ticket,
Marbles,
VitrinaBox,
Qr
}
public enum CountablePrizeType
{
Hopper,
Hopper2,
Ticket,
Marbles,
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 51f527d685fcbd34ab5acd35f3a8addd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,14 @@
namespace PrizeSystem
{
public class QrPrize : Prize
{
public int Rank { get; }
public string PrizeText { get; }
public override string Body => $"Qr:{Rank},{PrizeText}";
public QrPrize(int rank, string prizeText) : base(PrizeType.Qr)
{
Rank = rank;
PrizeText = prizeText;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f0b9a56f324282141bbf722af9ae3635
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,18 @@
using System.Linq;
namespace PrizeSystem
{
public class VitrinaPrize : Prize
{
public int[] Boxes { get; }
public override string Body => _cachedBody;
public string _cachedBody;
public VitrinaPrize(int[] boxes) : base(PrizeType.VitrinaBox)
{
Boxes = boxes.ToArray();
_cachedBody = $"VitrinaBox:{string.Join(",", Boxes)}";
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8971174ce66bde24b9043691dba5e10a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,97 +1,121 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using UnityEngine;
public static class PrizeSerializer
namespace PrizeSystem
{
const string CHARACTERS_PRIZES = "CharPrizes.prizRR";
static string FILE_PATH => Path.Combine(Application.persistentDataPath, CHARACTERS_PRIZES);
static int CharactersAmount => GameManager.instance.botsAmount;
public static List<Prize> GetPrizes()
public static class PrizeSerializer
{
if (!File.Exists(FILE_PATH))
const string CHARACTERS_PRIZES = "CharPrizes.prizRR";
static string FILE_PATH => Path.Combine(Application.persistentDataPath, CHARACTERS_PRIZES);
static int CharactersAmount => GameManager.instance.botsAmount;
public static List<Prize> LoadPrizes()
{
//Debug.Log("Не записаны призы беру дефолт");
return GetDefaultPrizes();
if (!File.Exists(FILE_PATH))
{
Debug.Log("Не записаны призы беру дефолт");
return GetDefaultPrizes();
}
string fileString = File.ReadAllText(FILE_PATH);
return DeserializePrizes(fileString);
}
string fileString = File.ReadAllText(FILE_PATH);
return DeserializePrizes(fileString);
}
public static void SetPrizes(List<Prize> prizes)
{
string serialized = SerializePrizes(prizes);
Debug.Log($"serialized: {serialized}");
File.WriteAllText(FILE_PATH, serialized);
}
public static string SerializePrizes(List<Prize> prizes)
{
StringBuilder sb = new();
for (int i = 0; i < CharactersAmount; i++)
/// <summary>
/// Сериализует и записывает в файл
/// </summary>
/// <param name="prizes"></param>
public static void SavePrizes(List<Prize> prizes)
{
sb.Append(prizes[i].ToString());
if (i < CharactersAmount - 1)
sb.Append("\n");
}
string result = sb.ToString();
//Debug.Log($"Serialized: {result}");
return result;
}
public static List<Prize> DeserializePrizes(string serialized)
{
string[] lines = serialized.Split('\n');
if (lines.Length != CharactersAmount)
{
return GetDefaultPrizes();
string serialized = SerializePrizes(prizes);
Debug.Log($"serialized: {serialized}");
File.WriteAllText(FILE_PATH, serialized);
}
List<Prize> prizes = new();
for (int i = 0; i < CharactersAmount; i++)
public static string SerializePrizes(List<Prize> prizes)
{
string[] elements = lines[i].Split(':');
StringBuilder sb = new();
PrizeType prizeType = (PrizeType)Enum.Parse(typeof(PrizeType), elements[0]);
for (int i = 0; i < CharactersAmount; i++)
{
sb.Append(prizes[i].Body);
string endOfLine = i < CharactersAmount - 1 ? "\n" : "";
sb.Append(endOfLine);
}
string result = sb.ToString();
return result;
}
/// <summary>
/// Преобразовать сериализованную строку в список призов
/// </summary>
public static List<Prize> DeserializePrizes(string serialized)
{
List<Prize> prizes = new();
int prizeAmount = int.Parse(elements[1]);
string[] lines = serialized.Split('\n');
if (lines.Length != CharactersAmount)
{
return GetDefaultPrizes();
}
Prize prize = new Prize(prizeType, prizeAmount);
prizes.Add(prize);
//Debug.Log($"deserizlized Prize{i}. {prize}");
foreach (string line in lines)
{
if (line == "None")
{
prizes.Add(PrizeUtils.CreatePrize());
}
else if (line.StartsWith("VitrinaBox:"))
{
string stripped = line.Substring("VitrinaBox:".Length);
int[] boxes = stripped.Split(",").Select(int.Parse).ToArray();
prizes.Add(PrizeUtils.CreatePrize(boxes));
}
else if (line.StartsWith("Qr:"))
{
string stripped = line.Substring("Qr:".Length);
string[] entries = stripped.Split(',');
int rank = int.Parse(entries[0]);
string text = entries[1];
prizes.Add(PrizeUtils.CreatePrize(rank,text));
}
else
{//считаемый приз
string[] entries = line.Split(":");
CountablePrizeType Type = (CountablePrizeType)Enum.Parse(typeof(CountablePrizeType), entries[0]);
int amount = int.Parse(entries[1]);
prizes.Add(PrizeUtils.CreatePrize(Type, amount));
}
}
return prizes;
}
return prizes;
}
//делает список пустых призов, последний индекс - приз с хоппера
public static List<Prize> GetDefaultPrizes()
{
List<Prize> prizes = new();
for (int i = 0; i < CharactersAmount-1; i++)
//делает список пустых призов, последний индекс - приз с хоппера
public static List<Prize> GetDefaultPrizes()
{
prizes.Add(new Prize(prizeType: PrizeType.None,
amount: 0));
List<Prize> prizes = new();
for (int i = 0; i < CharactersAmount - 1; i++)
{
prizes.Add(PrizeUtils.CreatePrize());
}
prizes.Add(PrizeUtils.CreatePrize(3, "5000 руб."));
SerializePrizes(prizes);
return prizes;
}
prizes.Add(new Prize(prizeType: PrizeType.Special,
amount: 1));
SerializePrizes(prizes);
return prizes;
}
}
}

View File

@ -1,222 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using UnityEngine;
/// <summary>
/// Система управления выдачей призов и ведения статистики игры.
/// Отвечает за процесс выдачи призов, подсчет запусков и наград.
/// </summary>
public class PrizeSystem : MonoBehaviour
{
[SerializeField] AudioClip prizeErrorSound;
[SerializeField] bool SoundNotification = true;
[SerializeField] List<AudioClip> PrizeNotificationSounds;
[SerializeField] Notification prizeNotification;
[SerializeField] VitrinaPanel vitrinaPanel;
public static string key_cash = "STARTS";
public static string key_cashNul = "STARTSNUL";
public static string key_prizesgiven = "PRIZESGIVEN";
public static string key_prizesgivenNul = "PRIZESGIVENNUL";
public static string HopperPrizeCounter = "HopperCounter";
public static string MarblesPrizeCounter = "MarblesCounter";
public static string TicketPrizeCounter = "TicketCounter";
public static string SpecialPrizeCounter = "SpecialCounter";
private static PrizeSystem instance;
private static bool prizing = false;
//===========================start: PUBLIC API===========================//
public void Initialize()
{
instance = this;
InitCounters();
}
public static void GivePrize(Prize prize)
{
bool settingEnabled = SettingsManager.GetBool("Prizing", false);
if (!settingEnabled) { Debug.Log("Выдача приза отключена в настройках"); return; }
if (prizing) { Debug.LogError("Уже идет выдача приза. Не спамь кнопку."); return; }
Debug.Log($"Поступил заказ приз: {prize}");
PrizeType prizeType = prize.PrizeType;
if (prizeType == PrizeType.None)
{
Debug.Log("Пустой приз. Возврат.");
return;
}
else if (prizeType == PrizeType.Special)
{
PlayerPrefs.SetInt("NeedSpecialPrize", 1);
}
else
{
instance.StartCoroutine(instance.PrizingProcess(prize.Amount, prizeType));
}
}
//===========================end: PUBLIC API===========================//
#region Приватные методы
private IEnumerator PrizingProcess(int amount, PrizeType Type)
{
Debug.Log($"Выдача приза {Type}. Количество: {amount}");
prizing = true;
bool atLeastOnePrize = false;
for (int i = 0; i < amount; i++)
{
bool noPrizWhenError = SettingsManager.GetBool("PrizingWhenError", true);
bool errorRegistred = PlayerPrefs.GetInt(KeyVault.PRIZING_ERROR_REGISTRED, 0) == 1;
if (errorRegistred && noPrizWhenError) yield break;
float timeout = 10;
string enableMotorComand = ComWrapper.BoardVersion switch
{
1 => "303",
2 => "301",
_ => "303"
};
Debug.Log($"Включаю мотор хоппера: {enableMotorComand}");
ComWrapper.Send(enableMotorComand);//включаем мотор
float startTime = Time.time;
bool success = false;
PlayerPrefs.SetInt("PrizeGivenBuffer", 0);//подготовка буфера
while (Time.time - startTime < timeout)
{
if (PlayerPrefs.GetInt("PrizeGivenBuffer", 0) == 1)
{
Debug.Log("Считан приз");
success = true;
break;
}
yield return null;
}
//Выключаем мотор
string disableMotorComand = ComWrapper.BoardVersion switch
{
1 => "302",
2 => "300",
_ => "302"
};
Debug.Log($"Выключаю мотор: {disableMotorComand}");
ComWrapper.Send(disableMotorComand);
Debug.Log("Закончил. Успех: " + success);
prizing = false;
if (success)
{
//контроль остатков
int prizesCount = PlayerPrefs.GetInt(KeyVault.PRIZES_AVAILABLE);
prizesCount = Mathf.Clamp(prizesCount - 1, 0, 9999);
PlayerPrefs.SetInt(KeyVault.PRIZES_AVAILABLE, prizesCount);
//Счетчики
IncreasePrizeCounters(Type);
//хотя бы что то успешно выпало
atLeastOnePrize = true;
}
else
{
PlayerPrefs.SetInt(KeyVault.PRIZING_ERROR_REGISTRED, 1);
SoundManager.instance.playClip(prizeErrorSound);
}
}
if (atLeastOnePrize)
{
NotificationSystem.instance.Notificate(prizeNotification);
SoundNotificationIfNeeds();
}
}
void IncreasePrizeCounters(PrizeType Type)
{
string prizeCounterKey = Type switch
{
PrizeType.Special => SpecialPrizeCounter,
PrizeType.Marbles => MarblesPrizeCounter,
PrizeType.Hopper => HopperPrizeCounter,
PrizeType.Hopper2 => HopperPrizeCounter,
PrizeType.Ticket => TicketPrizeCounter,
_ => "none"};
string prizeCounterKeyNullable = prizeCounterKey + "Nullable";
PlayerPrefs.SetInt(prizeCounterKey, PlayerPrefs.GetInt(prizeCounterKey, 0) + 1);
PlayerPrefs.SetInt(prizeCounterKeyNullable, PlayerPrefs.GetInt(prizeCounterKeyNullable, 0) + 1);
}
public static void ResetPrizeCounters()
{
PlayerPrefs.SetInt(HopperPrizeCounter + "Nullable", 0);
PlayerPrefs.SetInt(MarblesPrizeCounter + "Nullable", 0);
PlayerPrefs.SetInt(TicketPrizeCounter + "Nullable", 0);
PlayerPrefs.SetInt(SpecialPrizeCounter + "Nullable", 0);
}
public static string GetPrizesCounterNullableString()
{
StringBuilder sb = new();
sb.Append($"Х: {PlayerPrefs.GetInt(HopperPrizeCounter + "Nullable", 0)}. ");
sb.Append($"Т: {PlayerPrefs.GetInt(TicketPrizeCounter + "Nullable", 0)}. ");
sb.Append($"М: {PlayerPrefs.GetInt(MarblesPrizeCounter + "Nullable", 0)}. ");
sb.Append($"С: {PlayerPrefs.GetInt(SpecialPrizeCounter + "Nullable", 0)}. ");
return sb.ToString();
}
public static string GetPrizesCounterString()
{
StringBuilder sb = new();
sb.Append($"Х: {PlayerPrefs.GetInt(HopperPrizeCounter, 0)}. ");
sb.Append($"Т: {PlayerPrefs.GetInt(TicketPrizeCounter, 0)}. ");
sb.Append($"М: {PlayerPrefs.GetInt(MarblesPrizeCounter, 0)}. ");
sb.Append($"С: {PlayerPrefs.GetInt(SpecialPrizeCounter, 0)}. ");
return sb.ToString();
}
void InitCounters()
{
if (!PlayerPrefs.HasKey(key_cash)) PlayerPrefs.SetInt(key_cash, 0);
if (!PlayerPrefs.HasKey(key_cashNul)) PlayerPrefs.SetInt(key_cashNul, 0);
}
private void SoundNotificationIfNeeds()
{
if(!SoundNotification) return;
if (PrizeNotificationSounds == null || PrizeNotificationSounds.Count == 0) return;
int random = Random.Range(0, PrizeNotificationSounds.Count);
AudioClip notification = PrizeNotificationSounds[random];
SoundManager.instance.playClip(notification);
}
#endregion
}

View File

@ -0,0 +1,243 @@
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
namespace PrizeSystem
{
/// <summary>
/// Система управления выдачей призов и ведения статистики игры.
/// Отвечает за процесс выдачи призов, подсчет запусков и наград.
/// </summary>
public class PrizeSystemManager : MonoBehaviour
{
[SerializeField] AudioClip prizeErrorSound;
[SerializeField] bool SoundNotification = true;
[SerializeField] List<AudioClip> PrizeNotificationSounds;
[SerializeField] Notification prizeNotification;
[SerializeField] VitrinaPanel vitrinaPanel;
public static string key_cash = "STARTS";
public static string key_cashNul = "STARTSNUL";
public static string key_prizesgiven = "PRIZESGIVEN";
public static string key_prizesgivenNul = "PRIZESGIVENNUL";
public static string HopperPrizeCounter = "HopperCounter";
public static string MarblesPrizeCounter = "MarblesCounter";
public static string TicketPrizeCounter = "TicketCounter";
public static string SpecialPrizeCounter = "SpecialCounter";
private static PrizeSystemManager instance;
private static bool prizing = false;
//Прописать тут очереди.
private static Queue<QrPrize> qrPrizes;
private static Queue<VitrinaPrize> vitrinaPrizes;
public static bool HasQrPrizeToGive => qrPrizes.Count > 0;
public static bool HasVitrinaPrizeToGive => vitrinaPrizes.Count > 0;
//=========================== PUBLIC API ===========================//
public void Initialize()
{
instance = this;
InitCounters();
qrPrizes = new();
vitrinaPrizes = new();
}
public static QrPrize DequeueQrPrize() => HasQrPrizeToGive ? qrPrizes.Dequeue() : null;
public static VitrinaPrize DequeueVitrinaPrize() => HasVitrinaPrizeToGive ? vitrinaPrizes.Dequeue() : null;
public static void GivePrize(Prize prize)
{
if (prize == null)
{
Debug.Log("Приз Null"); return;
}
//Если призы отключены в принципе, то не выдаем.
bool prizingEnabled = SettingsManager.GetBool("Prizing", false);
if (!prizingEnabled) return;
Debug.Log($"Поступил заказ приз: {prize.Body}");
if (prize is EmptyPrize)
{
Debug.Log("Пустой приз. Возврат.");
return;
}
else if (prize is CountablePrize countablePrize)
{
instance.StartCoroutine(instance.PrizingProcess(countablePrize.Amount, countablePrize.Type));
}
else if (prize is VitrinaPrize vitrinaPrize)
{
vitrinaPrizes.Enqueue(vitrinaPrize);
}
else if(prize is QrPrize qrPrize)
{
qrPrizes.Enqueue(qrPrize);
}
}
//=========================== privates ===========================//
#region Приватные методы
private string StartHopperCommand => ComWrapper.BoardVersion switch { 1 => "303", 2 => "301", _ => "303" };
private string StopHopperCommand => ComWrapper.BoardVersion switch { 1 => "302", 2 => "300", _ => "302" };
private IEnumerator PrizingProcess(int amount, CountablePrizeType Type)
{
if (prizing)
{
Debug.LogError("Уже идет выдача приза. Повторная выдача отключена");
yield break;
}
prizing = true;
Debug.Log($"Выдача приза {Type}. Количество: {amount}");
bool atLeastOnePrize = false;
for (int i = 0; i < amount; i++)
{
bool noPrizWhenError = SettingsManager.GetBool("PrizingWhenError", true);
bool errorRegistred = PlayerPrefs.GetInt(KeyVault.PRIZING_ERROR_REGISTRED, 0) == 1;
if (errorRegistred && noPrizWhenError) yield break;
float timeout = 10;
Debug.Log($"Включаю мотор хоппера: {StartHopperCommand}");
ComWrapper.Send(StartHopperCommand);//включаем мотор
float startTime = Time.time;
bool success = false;
PlayerPrefs.SetInt("PrizeGivenBuffer", 0);//подготовка буфера
while (Time.time - startTime < timeout)
{
if (PlayerPrefs.GetInt("PrizeGivenBuffer", 0) == 1)
{
Debug.Log("Считан приз");
success = true;
break;
}
yield return null;
}
//Выключаем мотор
Debug.Log($"Выключаю мотор: {StopHopperCommand}");
ComWrapper.Send(StopHopperCommand);
Debug.Log("Закончил. Успех: " + success);
if (success)
{
//контроль остатков
int prizesCount = PlayerPrefs.GetInt(KeyVault.PRIZES_AVAILABLE);
prizesCount = Mathf.Clamp(prizesCount - 1, 0, 9999);
PlayerPrefs.SetInt(KeyVault.PRIZES_AVAILABLE, prizesCount);
//Счетчики
IncreasePrizeCounters(Type);
//хотя бы что то успешно выпало
atLeastOnePrize = true;
}
else
{
PlayerPrefs.SetInt(KeyVault.PRIZING_ERROR_REGISTRED, 1);
SoundManager.instance.playClip(prizeErrorSound);
}
}
if (atLeastOnePrize)
{
NotificationSystem.instance.Notificate(prizeNotification);
SoundNotificationIfNeeds();
}
prizing = false;
}
void IncreasePrizeCounters(CountablePrizeType Type)
{
string prizeCounterKey = Type switch
{
CountablePrizeType.Marbles => MarblesPrizeCounter,
CountablePrizeType.Hopper => HopperPrizeCounter,
CountablePrizeType.Hopper2 => HopperPrizeCounter,
CountablePrizeType.Ticket => TicketPrizeCounter,
_ => "none"
};
string prizeCounterKeyNullable = prizeCounterKey + "Nullable";
PlayerPrefs.SetInt(prizeCounterKey, PlayerPrefs.GetInt(prizeCounterKey, 0) + 1);
PlayerPrefs.SetInt(prizeCounterKeyNullable, PlayerPrefs.GetInt(prizeCounterKeyNullable, 0) + 1);
}
public static void ResetPrizeCounters()
{
PlayerPrefs.SetInt(HopperPrizeCounter + "Nullable", 0);
PlayerPrefs.SetInt(MarblesPrizeCounter + "Nullable", 0);
PlayerPrefs.SetInt(TicketPrizeCounter + "Nullable", 0);
PlayerPrefs.SetInt(SpecialPrizeCounter + "Nullable", 0);
}
public static string GetPrizesCounterNullableString()
{
StringBuilder sb = new();
sb.Append($"Х: {PlayerPrefs.GetInt(HopperPrizeCounter + "Nullable", 0)}. ");
sb.Append($"Т: {PlayerPrefs.GetInt(TicketPrizeCounter + "Nullable", 0)}. ");
sb.Append($"М: {PlayerPrefs.GetInt(MarblesPrizeCounter + "Nullable", 0)}. ");
sb.Append($"С: {PlayerPrefs.GetInt(SpecialPrizeCounter + "Nullable", 0)}. ");
return sb.ToString();
}
public static string GetPrizesCounterString()
{
StringBuilder sb = new();
sb.Append($"Х: {PlayerPrefs.GetInt(HopperPrizeCounter, 0)}. ");
sb.Append($"Т: {PlayerPrefs.GetInt(TicketPrizeCounter, 0)}. ");
sb.Append($"М: {PlayerPrefs.GetInt(MarblesPrizeCounter, 0)}. ");
sb.Append($"С: {PlayerPrefs.GetInt(SpecialPrizeCounter, 0)}. ");
return sb.ToString();
}
void InitCounters()
{
if (!PlayerPrefs.HasKey(key_cash)) PlayerPrefs.SetInt(key_cash, 0);
if (!PlayerPrefs.HasKey(key_cashNul)) PlayerPrefs.SetInt(key_cashNul, 0);
}
private void SoundNotificationIfNeeds()
{
if (!SoundNotification) return;
if (PrizeNotificationSounds == null || PrizeNotificationSounds.Count == 0) return;
int random = Random.Range(0, PrizeNotificationSounds.Count);
AudioClip notification = PrizeNotificationSounds[random];
SoundManager.instance.playClip(notification);
}
#endregion
}
}

Some files were not shown because too many files have changed in this diff Show More