Rotator Hints
This commit is contained in:
@@ -382,6 +382,7 @@ public class Client : MonoBehaviour
|
||||
case 14:
|
||||
int type = job.data[9];
|
||||
RandomRotator rotator = uiHandler.rotator.GetComponent<RandomRotator>();
|
||||
rotator.SetHint(type);
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
@@ -408,6 +409,7 @@ public class Client : MonoBehaviour
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
int option = job.data[i + 1];
|
||||
|
||||
@@ -230,6 +230,7 @@ public class PlayablePlayer : Player
|
||||
rotator.SetOptionsText(1, randCoins2 + " Coins");
|
||||
rotator.SetOptionsText(2, randCoins3 + " Coins");
|
||||
rotator.SetOptionsText(3, "Random Item");
|
||||
rotator.SetHint(0);
|
||||
|
||||
rotator.StartRandom();
|
||||
client.SendStartRotator(0, 0, 1, 2, randCoins1, randCoins2, -randCoins3, 0, 0);
|
||||
@@ -268,6 +269,7 @@ public class PlayablePlayer : Player
|
||||
rotatorItemField.SetOptionsText(1, "Double Dice");
|
||||
rotatorItemField.SetOptionsText(2, "Trap");
|
||||
rotatorItemField.SetOptionsText(3, "Trap");
|
||||
rotatorItemField.SetHint(1);
|
||||
|
||||
rotatorItemField.StartRandom();
|
||||
client.SendStartRotator(0, 1, 2, 2, 0, 0, 0, 0, 1);
|
||||
|
||||
@@ -17,6 +17,17 @@ public class RandomRotator : MonoBehaviour
|
||||
private bool ended = false;
|
||||
[SerializeField] private GameObject fullBlocker;
|
||||
|
||||
[SerializeField] private Sprite[] hintImages;
|
||||
private string[] hintTexts = { "Lucky Field", "Item Field" };
|
||||
[SerializeField] private Image hintImage;
|
||||
[SerializeField] private TMP_Text hintText;
|
||||
|
||||
public void SetHint(int type)
|
||||
{
|
||||
hintText.text = hintTexts[type];
|
||||
hintImage.sprite = hintImages[type];
|
||||
}
|
||||
|
||||
public void SetOptionsText(int index, string text)
|
||||
{
|
||||
textOptions[index].text = text;
|
||||
|
||||
Reference in New Issue
Block a user