public int triggerGoal;//the # of enemies required to kill to activate spawns // Use this for initialization void Start() { periodBetweenSpawn = Random.Range(startTime, endTime); timer = periodBetweenSpawn; //set timer to 5 for example stats = GameObject.Find("RoboPlayer").GetComponent <PickupsAndStats>(); control = GameObject.Find("RoboPlayer").GetComponent <GameControl>(); }
private void Start() { player = GameObject.Find("RoboPlayer"); stats = player.GetComponent <PickupsAndStats>(); speed += 10; if (stats.Kills < 20) { speed += 1.9f * stats.Kills; } else if (stats.Kills >= 20 && stats.Kills < 50) { speed += 1.9f * 20; } else if (stats.Kills >= 50 && stats.Kills < 100) { speed += 1.9f * 25; } else { speed += 1.9f * 30; } }
// Use this for initialization void Start() { //textComponent = GetComponent<Text>(); player = GameObject.Find("RoboPlayer"); statsScript = player.GetComponent <PickupsAndStats>(); }
private void Start() { stats = GameObject.Find("RoboPlayer").GetComponent <PickupsAndStats>(); }
// Use this for initialization void Start() { rigidbody = GetComponent <Rigidbody2D>(); stats = GameObject.Find("RoboPlayer").GetComponent <PickupsAndStats>(); }