protected override void Awake() { base.Awake(); area = transform.GetComponentInChildren <GameAreaInit>(); text = transform.FindChildByName("TimeText").GetComponent <TimeScript>(); GetEventListener("ReturnButton").PointerClick += OnReturnButtonClick; GetEventListener("RestartButton").PointerClick += OnRestartButtonClick; }
void Start() { area = transform.parent.FindChildByName("GameArea").GetComponent <GameAreaInit>(); text = transform.GetComponent <Text>(); Init(); }
public override void Init() { base.Init(); audioSource = Camera.main.GetComponent <AudioSource>(); gameArea = transform.FindChildByName("GameArea").GetComponent <GameAreaInit>(); }