Example #1
0
    private void Start()
    {
        baseCarDamage = carDamage;
        baseDaze      = dazedLength;

        ps = FindObjectOfType <Player_stats>();

        stat_manager = GameObject.Find("StatManager").GetComponent <Stat_Manager>();
        difficulty   = stat_manager.GetDifficulty();
        StartDifficulty(difficulty); // will make enemies harder as player progresses through the game
        dda = GameObject.Find("DDA").GetComponent <DynamicDifficultyAdjuster>();
        dda.Subscribe(this);

        icon = GameObject.Find("GameUI").transform.Find("DownSpeedIcon").gameObject;
    }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player");
        //startRoutine = FindObjectOfType<startBossFight>();
        rb = GetComponent <Rigidbody2D>();

        spawnMinion = Time.time;

        carTarget = thrownCars[0].GetComponent <Transform>();

        bossHealth = boss.GetComponent <EnemyStats>().health;
        maxHealth  = bossHealth;

        mainCam = FindObjectOfType <Camera>();

        bossTrans = boss.GetComponent <Transform>();

        //calculate player postion
        throwAtTarget = target.transform.position - transform.position;
        bossMethod    = StartCoroutine(bossOne());

        baseWaitTime   = waitTime;
        baseSpeed      = speed;
        baseSpawnRate  = spawnRate;
        baseThrowSpeed = throwSpeed;
        baseBurstTimer = burstTimer;
        baseBurst      = burst;
        basePause      = pauseTime;

        stat_manager = GameObject.Find("StatManager").GetComponent <Stat_Manager>();
        gameManager  = FindObjectOfType <GameManager>();

        difficulty = stat_manager.GetDifficulty();
        dda        = GameObject.Find("DDA").GetComponent <DynamicDifficultyAdjuster>();
        dda.Subscribe(this);
    }
Example #3
0
 private void Awake()                                            //AWAKE
 {
     stat_m  = GetComponent <Stat_Manager>();
     v_modif = GetComponent <Vehicle_Modifier>();
 }