// Start is called before the first frame update void Start() { index = 2; randomDiceSide1 = 0; nextDice = GameObject.Find("Blue Dice"); dc = GameObject.Find("Red Dice").GetComponent <DiceRed>(); nextDc = nextDice.GetComponent <Dice>(); boardC = GameObject.Find("board").GetComponent <Controller>(); position = GetComponent <Position>(); position.index = index; position.koraci = index; }
private void Start() { pawn1 = GameObject.Find("pawn (4)").GetComponent <PawnBlue>(); pawn2 = GameObject.Find("pawn (5)").GetComponent <PawnBlue>(); pawn3 = GameObject.Find("pawn (6)").GetComponent <PawnBlue>(); pawn4 = GameObject.Find("pawn (7)").GetComponent <PawnBlue>(); rend = GetComponent <SpriteRenderer>(); diceSides = Resources.LoadAll <Sprite>("DiceSides/"); board = GameObject.Find("board"); boardC = board.GetComponent <Controller>(); nextDice = GameObject.Find("Yellow Dice"); nextDc = nextDice.GetComponent <DiceYellow>(); beforeDice = GameObject.Find("Red Dice"); beforeDc = beforeDice.GetComponent <DiceRed>(); }
// Start is called before the first frame update void Start() { pawn1 = GameObject.Find("pawn (8)").GetComponent <PawnGreen>(); pawn2 = GameObject.Find("pawn (13)").GetComponent <PawnGreen>(); pawn3 = GameObject.Find("pawn (14)").GetComponent <PawnGreen>(); pawn4 = GameObject.Find("pawn (15)").GetComponent <PawnGreen>(); //click = true; rend = GetComponent <SpriteRenderer>(); diceSides = Resources.LoadAll <Sprite>("DiceSides/"); board = GameObject.Find("board"); boardC = board.GetComponent <Controller>(); nextDc = GameObject.Find("Green Dice").GetComponent <DiceRed>(); beforeDc = GameObject.Find("Yellow Dice").GetComponent <DiceYellow>(); }
// 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>(); }