void Start() { GameObject temp = gameObject.transform.parent.gameObject; stickBasicScriptObj1 = temp.GetComponent <StickBasic>(); healthBar = healthSquareObj.GetComponent <HealthBar>(); }
void Awake() { stickBasicScript1 = stickMan1.GetComponent <StickBasic>(); stickBasicScript2 = stickMan2.GetComponent <StickBasic2>(); winText = winTextObj.GetComponent <Text>(); waitText = waitTextObj.GetComponent <Text>(); winTextObj.SetActive(false); waitTextObj.SetActive(false); restartBtn.SetActive(false); quitBtn.SetActive(false); alreadyWon = false; gameOver = false; }