// Start is called before the first frame update void Start() { index = 28; randomDiceSide1 = 0; dc = GameObject.Find("Yellow Dice").GetComponent <DiceYellow>(); nextDc = GameObject.Find("Green Dice").GetComponent <DiceGreen>(); boardC = GameObject.Find("board").GetComponent <Controller>(); position = GetComponent <Position>(); position.index = index; position.koraci = index; }
// Start is called before the first frame update void Start() { index = 41; randomDiceSide1 = 0; dice = GameObject.Find("Green Dice"); nextDice = GameObject.Find("Red Dice"); dc = dice.GetComponent <DiceGreen>(); nextDc = nextDice.GetComponent <DiceRed>(); boardC = GameObject.Find("board").GetComponent <Controller>(); position = GetComponent <Position>(); position.index = index; position.koraci = index; }
// Start is called before the first frame update void Start() { pawn1 = GameObject.Find("pawn (9)").GetComponent <PawnYellow>(); pawn2 = GameObject.Find("pawn (10)").GetComponent <PawnYellow>(); pawn3 = GameObject.Find("pawn (11)").GetComponent <PawnYellow>(); pawn4 = GameObject.Find("pawn (12)").GetComponent <PawnYellow>(); //click = true; rend = GetComponent <SpriteRenderer>(); diceSides = Resources.LoadAll <Sprite>("DiceSides/"); boardC = GameObject.Find("board").GetComponent <Controller>(); nextDice = GameObject.Find("Green Dice"); nextDc = nextDice.GetComponent <DiceGreen>(); beforeDice = GameObject.Find("Dice"); beforeDc = beforeDice.GetComponent <Dice>(); }
// Start is called before the first frame update void Start() { timerSides = Resources.LoadAll <Sprite>("TimerSides/"); isMyMove = false; client = FindObjectOfType <Client>(); redTimer = GameObject.Find("RedTimer"); blueTimer = GameObject.Find("BlueTimer"); greenTimer = GameObject.Find("GreenTimer"); yellowTimer = GameObject.Find("YellowTimer"); redTimer.SetActive(false); blueTimer.SetActive(false); greenTimer.SetActive(false); yellowTimer.SetActive(false); red = GameObject.Find("Red Dice").GetComponent <DiceRed>(); blue = GameObject.Find("Blue Dice").GetComponent <Dice>(); green = GameObject.Find("Green Dice").GetComponent <DiceGreen>(); yellow = GameObject.Find("Yellow Dice").GetComponent <DiceYellow>(); redInd = GameObject.Find("redIndicator"); blueInd = GameObject.Find("blueIndicator"); greenInd = GameObject.Find("greenIndicator"); yellowInd = GameObject.Find("yellowIndicator"); redInd.SetActive(false); blueInd.SetActive(false); greenInd.SetActive(false); yellowInd.SetActive(false); switch (client.clientColor) { case "Red": collide = GameObject.Find("Red Dice").GetComponent <BoxCollider2D>(); collide.enabled = true; isMyMove = true; client.isMyMove = true; redInd.SetActive(true); render = redTimer.GetComponent <SpriteRenderer>(); break; case "Blue": collide = GameObject.Find("Blue Dice").GetComponent <BoxCollider2D>(); collide.enabled = true; render = blueTimer.GetComponent <SpriteRenderer>(); break; case "Green": collide = GameObject.Find("Green Dice").GetComponent <BoxCollider2D>(); collide.enabled = true; render = greenTimer.GetComponent <SpriteRenderer>(); break; case "Yellow": collide = GameObject.Find("Yellow Dice").GetComponent <BoxCollider2D>(); collide.enabled = true; render = yellowTimer.GetComponent <SpriteRenderer>(); break; default: break; } napolju = 0; unutra = 0; listaNapolju = new LinkedList <string>(); }