void Start () { player = GameObject.Find("player"); bonusLifecycle = GameObject.Find("ObstacleManager").GetComponent<BonusLifecycle>(); score = (KeepScore)GameObject.Find("progress_bar").GetComponent(typeof(KeepScore)); minSpeed += Random.Range(-0.015f, 0.005f); maxSpeed += Random.Range(-0.08f, 0.01f); }
void Start () { manager = (ManageTutorial)GameObject.Find("TutorialManager").GetComponent(typeof(ManageTutorial)); bl = (BonusLifecycle)GameObject.Find("ObstacleManager").GetComponent(typeof(BonusLifecycle)); score = (KeepScore)GameObject.Find("progress_bar").GetComponent(typeof(KeepScore)); if(isCollectionTarget || isTimed){ GetComponent<Collider2D>().enabled = false; } if(ObjectsToAdd.Length > 0){ for(int i = 0; i< ObjectsToAdd.Length; i++){ ObjectsToAdd[i].SetActive(false); } } }
// Use this for initialization void Start () { if(GameObject.Find("ObstacleManager")){ bonusLifecycle = (BonusLifecycle)GameObject.Find("ObstacleManager").GetComponent(typeof(BonusLifecycle)); Refresh(); } }