Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     enemyRb             = GetComponent <Rigidbody>();
     playerGoal          = GameObject.Find("Player Goal");
     scriptSpawnManagerX = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();
     speed = scriptSpawnManagerX.enemySpeed;
 }
Exemple #2
0
    // Start is called before the first frame update
    void Start()
    {
        spawnManagerX = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();

        enemyRb    = GetComponent <Rigidbody>();
        playerGoal = GameObject.Find("Player Goal");
    }
Exemple #3
0
 // Start is called before the first frame update
 void Start()
 {
     speedBoost = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();
     speed      = speedBoost.enemySpeed;
     enemyRb    = GetComponent <Rigidbody>();
     playerGoal = GameObject.Find("Player Goal");
 }
Exemple #4
0
 // Start is called before the first frame update
 void Start()
 {
     playerGoal   = GameObject.Find("Player Goal");
     enemyRb      = GetComponent <Rigidbody>();
     spawnManager = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();
     speed        = (defaultSpeed * (1.0f + (0.25f * (float)spawnManager.waveCount)));
 }
Exemple #5
0
    // Start is called before the first frame update
    void Start()
    {
        enemyRb = GetComponent <Rigidbody>();
        player  = GameObject.Find("Player");

        spawnScript = GameObject.Find("Spawn").GetComponent <SpawnManagerX>();
    }
    // Start is called before the first frame update
    void Start()
    {
        enemyRb    = GetComponent <Rigidbody>();
        playerGoal = GameObject.Find("Player Goal");

        increaseReference = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX> ();
    }
Exemple #7
0
 // Start is called before the first frame update
 void Start()
 {
     enemyRb      = GetComponent <Rigidbody>();
     playerGoal   = GameObject.Find("Player");
     spawnManager = GameObject.FindObjectOfType <SpawnManagerX>();
     speed        = spawnManager.enemySpeed;
 }
 // Start is called before the first frame update
 void Start()
 {
     enemyRb            = GetComponent <Rigidbody>();
     playerGoal         = GameObject.Find("Player Goal");
     SpawnMangerXscript = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();
     speed = SpawnMangerXscript.SpeedInc;
 }
Exemple #9
0
 // Start is called before the first frame update
 void Start()
 {
     enemyRb             = GetComponent <Rigidbody>();
     playerGoal          = GameObject.Find("Player Goal");                                  //busca el objeto Player Goal
     spawnManagerXScript = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>(); //busca spawnmanager y obtiene sus componentes
     speed = spawnManagerXScript.enemySpeed;                                                // accedo a enemySpeed creada en SM
 }
Exemple #10
0
 // Start is called before the first frame update
 void Start()
 {
     enemyRb    = GetComponent <Rigidbody>();
     playerGoal = GameObject.Find("Player Goal");
     // ja dit deel van de opdracht vond ik te moeilijk dus heb ik opgezocht XD
     spawnManagerXScript = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();
     speed = spawnManagerXScript.enemySpeed;
 }
Exemple #11
0
 // Start is called before the first frame update
 void Start()
 {
     enemyRb        = GetComponent <Rigidbody>();
     playerGoal     = GameObject.Find("Player Goal");
     spawnMangerObj = GameObject.Find("Spawn Manager");
     spawnmanager   = spawnMangerObj.GetComponent <SpawnManagerX>();
     speed          = spawnmanager.enemySpeed;
 }
Exemple #12
0
 void Start()
 {
     enemyRb             = GetComponent <Rigidbody>();
     playerGoal          = GameObject.Find("Player Goal");
     spawnManagerXScript = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();
     //gebruikt voor speed de waarde van enemySpeed uit het spawnmanagerscript
     speed = spawnManagerXScript.enemySpeed;
 }
Exemple #13
0
    // Start is called before the first frame update
    void Start()
    {
        enemyRb = GetComponent <Rigidbody>();
        GameObject    spawnManager = GameObject.Find("Spawn Manager");
        SpawnManagerX spawnScript  = spawnManager.GetComponent <SpawnManagerX>();

        speed = spawnScript.realSpeed;
    }
Exemple #14
0
    // Start is called before the first frame update
    void Start()
    {
        enemyRb = GetComponent <Rigidbody>();

        //set smxscript to spawnmanaerx script attached to spawn manager object
        smxScript = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();
        //set speed to enemy speed
        speed = smxScript.enemySpeed;
    }
Exemple #15
0
    // Start is called before the first frame update
    void Start()
    {
        enemyRb    = GetComponent <Rigidbody>();
        playerGoal = GameObject.Find("Player Goal");


        _spawnManagerX = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();
        waveCount      = _spawnManagerX.GetWaveCount();
    }
Exemple #16
0
 // Start is called before the first frame update
 void Start()
 {
     enemyRb = GetComponent<Rigidbody>();
     playerGoal = GameObject.Find("Player Goal");
     
     //Gets Wave Count for Speed Boost
     spawnMan = GameObject.Find("Spawn Manager");
     spawnies = spawnMan.GetComponent<SpawnManagerX>();
 }
    // Update is called once per frame
    void Update()
    {
        // Set enemy direction towards player goal and move there
        Vector3 lookDirection = (playerGoal.transform.position - transform.position).normalized;

        enemyRb.AddForce(lookDirection * speed * Time.deltaTime);
        spawnManagerXScript = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();
        speed = spawnManagerXScript.enemySpeed;
    }
Exemple #18
0
    // Start is called before the first frame update
    void Start()
    {
        enemyRb     = GetComponent <Rigidbody>();
        playerGoal  = GameObject.FindGameObjectWithTag("Player");
        gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
        SpawnManagerX spawnManager = GameObject.FindGameObjectWithTag("SpawnManager").GetComponent <SpawnManagerX>();

        speed = spawnManager.speed;
    }
Exemple #19
0
    // Start is called before the first frame update
    void Start()
    {
        GameObject    spawnManager = GameObject.Find("Spawn Manager");
        SpawnManagerX enemySpeed   = spawnManager.GetComponent <SpawnManagerX>();

        speed      = enemySpeed.enemySpeed;
        playerGoal = GameObject.Find("Goals/Player Goal");
        enemyRb    = GetComponent <Rigidbody>();
    }
Exemple #20
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
    // Start is called before the first frame update
    void Start()
    {
        spawnManagerScript = GameObject.Find("Spawn Manager").GetComponent <SpawnManagerX>();

        enemyRb = GetComponent <Rigidbody>();
    }
Exemple #22
0
 // Start is called before the first frame update
 void Start()
 {
     enemyRb      = GetComponent <Rigidbody>();
     spawnManager = transform.parent.GetComponent <SpawnManagerX>();
 }
 private void Awake()
 {
     _SpawnManagerX = this;
 }