private void Start()
    {
        //spawns laser boss
        boss_GO  = GameObject.Find("Laser_Boss").gameObject;
        boss_Pos = GameObject.FindGameObjectWithTag("Laser_Pos");
        // boss_GO.transform.SetParent(GameObject.FindGameObjectWithTag("Boss_Room").transform);
        boss_GO.SetActive(false);
        boss_GO.transform.position = new Vector3(365.5667f, -18.6f, 65.15f);
        boss_GO.gameObject.SetActive(true);
        random_Num = Random.Range(0, 2);
        random_Num = 1;
        if (random_Num == 1)
        {
            boss_Type = Boss_Type.LASER;
        }

        else
        {
            boss_Type = Boss_Type.MULTI_DISC;
        }
        player         = GameObject.FindWithTag("Player").transform;
        cam            = GameObject.FindWithTag("MainCamera").GetComponent <CameraFollow>();
        shootingScript = player.GetComponent <MouseShooting>();
        moveScript     = player.GetComponent <CharacterNavMeshMovement>();
    }
Esempio n. 2
0
    //private Material mat;

    void Awake()
    {
        charController = GameObject.FindWithTag("Player").GetComponent <CharacterNavMeshMovement>();
        shootScript    = charController.GetComponent <MouseShooting>();
        rb             = GetComponent <Rigidbody>();
        audioSource    = GetComponent <AudioSource>();
        //mat = GetComponent<MeshRenderer>().material;
        currentDamage  = baseDamage;
        comboParticles = GetComponentInChildren <ParticleSystem>();
    }
    void Start()
    {
        roomGen = transform.parent.GetComponent <RoomGenerator>();
        GameObject gO = GameObject.Find("Level Generator");

        enMan          = gO.GetComponent <EnemyManager>();
        levGen         = gO.GetComponent <LevelGenerator>();
        levMan         = gO.GetComponent <LevelManager>();
        cam            = GameObject.FindWithTag("MainCamera").GetComponent <CameraFollow>();
        gO             = GameObject.FindWithTag("Player");
        shootingScript = gO.GetComponent <MouseShooting>();
        moveScript     = gO.GetComponent <CharacterNavMeshMovement>();

        pointsPerRoom = enMan.levelDifficulty;
        if (DebugHandler.debugEnabled)
        {
            roomMask.GetComponent <MeshRenderer>().enabled = DebugHandler.roomMasksEnabled;
        }
    }
 void Start()
 {
     shootScript = GameObject.FindWithTag("Player").GetComponent <MouseShooting>();
 }