private void Start() { Instance = this; DontDestroyOnLoad(gameObject); Admob.Instance().initAdmob(bannerId, videoId); }
void Awake() { floor = GameObject.Find("Foreground"); player = GameObject.Find("Player"); spawner = GameObject.Find("Spawner").GetComponent <Spawner>(); treasureSpawner = GameObject.Find("TreasureSpawner").GetComponent <TreasureSpawner>(); timeManager = GetComponent <TimeManager>(); pixelPerfectCamera = GameObject.Find("Main Camera").GetComponent <PixelPerfectCamera>(); gameOverWindow = GameObject.Find("GameOverWindow"); playButton = GameObject.Find("StartGame"); myImage = GameObject.Find("StartGame").GetComponent <Button>().GetComponent <Image>(); gameAdManager = GameObject.Find("GameManager").GetComponent <GameAdManager>(); config(); DontDestroyOnLoad(this); }