Example #1
0
    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>();
    }
Example #2
0
    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;
        }
    }
Example #3
0
 // Use this for initialization
 void Start()
 {
     //textComponent = GetComponent<Text>();
     player      = GameObject.Find("RoboPlayer");
     statsScript = player.GetComponent <PickupsAndStats>();
 }
Example #4
0
 private void Start()
 {
     stats = GameObject.Find("RoboPlayer").GetComponent <PickupsAndStats>();
 }
Example #5
0
 // Use this for initialization
 void Start()
 {
     rigidbody = GetComponent <Rigidbody2D>();
     stats     = GameObject.Find("RoboPlayer").GetComponent <PickupsAndStats>();
 }