private void Awake() { origHamTimer = hamTimer; audioSource = GetComponent <AudioSource>(); manager = FindObjectOfType <BrokenMachine>(); thisPlayer = GetComponentInParent <MachineController>().currPlayer; hammerAnim = transform.GetChild(0).GetComponent <Animator>(); }
private void Awake() { currPlayer = FindObjectOfType <ScoreManager>().players[playerNum - 1]; manager = FindObjectOfType <BrokenMachine>(); //Debug.Log(name + " ," + (playerNum - 1)) ; //Debug.Log(name + " = " +currPlayer); //currPlayer = players[playerNum - 1]; //Debug.Log(name + " = " + currPlayer); for (int i = 0; i < transform.childCount; i++) { if (transform.GetChild(i).GetComponent <BrokenPart>() == true) { parts.Add(transform.GetChild(i).GetComponent <BrokenPart>()); } } AITimer = Random.Range(AITimerRange.x, AITimerRange.y); }