protected float GetHorizontalGap() { //Get gap field from parent GamePlayBehaviour behaviour = GameObject.Find(Const.gamePlayGameObject).GetComponent <GamePlayBehaviour>(); return(behaviour.GetHorizontalGap()); }
/// <summary> /// Gets the scrolling speed from the parent and returns it /// </summary> /// <returns>Scroll speed</returns> protected float GetNewScrollSpeed() { //Get game speed GamePlayBehaviour behaviour = GameObject.Find(Const.gamePlayGameObject).GetComponent <GamePlayBehaviour>(); return(behaviour.GetGameSpeed()); }