void Awake() { bestScore = PlayerPrefs.GetInt("BEST"); //player = GameObject.Find("Player"); player = FindObjectOfType <PlaayerMove>(); MinPosition = new Vector2(-7f, -13f); MaxPosition = new Vector2(7f, 13f); Spawnhihi = StartCoroutine(SpawnCroissant()); poolManager = FindObjectOfType <poolManager>(); Spawnhihihi = StartCoroutine(SpawnHotdog()); }
// Use this for initialization void Start() { poolManager pool = new poolManager(go, feathersPos.Count); for (int i = 0; i < feathersPos.Count; i++) { GameObject feather = pool.Get(); feather.transform.position = feathersPos[i]; feather.GetComponent <collectableScripte>().progress = progress; feather.GetComponent <collectableScripte>().source = collectSound; feather.GetComponent <collectableScripte>().pcc = pcc; feather.GetComponent <collectableScripte>().tag = this.tag; feather.GetComponent <collectableScripte>().pool = pool; feather.GetComponent <collectableScripte>().bee = bee; } }
// Start is called before the first frame update private void Awake() { instance = this; }
// Start is called before the first frame update void Start() { _poolManager = poolManager.instance; }
public void Start() { _poolManager = poolManager.instance; InvokeRepeating("LaunchBullet", 0, repeatRate); }