void Awake() { _background = this.transform.Find("Polaroid/DestinationScene"); _foreground = this.transform.Find("Polaroid/DestinationScene/DestinationForeground"); m_PolaroidGroup = this.transform.Find("Polaroid").GetComponent <GroupHider>(); m_Masks = gameObject.AddComponent <MaskOptimizer>(); }
void Awake() { closeBtn = transform.Find("PopUpHolder/BtnClose"); musicBtn = transform.Find("PopUpHolder/BtnMusic"); soundBtn = transform.Find("PopUpHolder/BtnSound"); resetBtn = transform.Find("PopUpHolder/BtnReset"); homeBtn = transform.Find("PopUpHolder/BtnHome"); stampsBtn = transform.Find("PopUpHolder/BtnStamps"); stampCollection = eggScreen.transform.FindChild("StampCollection"); musicOnState.pressedSprite = musicBtn.GetComponent <Button>().spriteState.pressedSprite; soundOnState.pressedSprite = soundBtn.GetComponent <Button>().spriteState.pressedSprite; musicOn = musicBtn.GetComponent <Image>().sprite; soundOn = soundBtn.GetComponent <Image>().sprite; m_GroupHider = closeBtn.transform.parent.gameObject.AddComponent <GroupHider>(); }