예제 #1
0
    void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player");
        playerMovement = player.GetComponent<PlayerMovement>();

        enemy1 = GameObject.FindGameObjectWithTag("Enemy 1");
        enemy1Controller = enemy1.GetComponent<EnemyController>();

        enemy2 = GameObject.FindGameObjectWithTag("Enemy 2");
        enemy2Controller = enemy2.GetComponent<EnemyController>();

        delay = enemy1Controller.getFireRate();

        nextUsage = Time.time + delay;
        playingTime = Time.time;
    }