Exemplo n.º 1
0
    // Called before start
    public void Awake()
    {
        // Get the GameManager
        gameManager = FindObjectOfType <GameManager>();

        // Get the loading screen
        loadingScreenRef = FindObjectOfType <LoadingScreen>();

        // Get the button's audio source component
        clickedAudioSource = GetComponent <AudioSource>();

        // Get the main HUD manager
        mainHUDManager = FindObjectOfType <MainHUDManager>();

        // Get the player's paddle
        paddleRef = FindObjectOfType <PaddleController>();

        // Get the ball
        ballRef = FindObjectOfType <Ball>();

        // Get the point blocks in the level
        pointBlocks = FindObjectsOfType <PointBlock>();

        // Get the loading particle gameobject
        loadingParticle = GameObject.FindGameObjectWithTag("LoadingParticle");
    }
Exemplo n.º 2
0
 // ottiene le istanze dei sotto-moduli di games manager: wavesmanager, scoremanager etc. etc.
 void getSubManagerModulesIstances()
 {
     wavesManager    = GameObject.FindGameObjectWithTag("WavesManager").GetComponent <WavesManager>();
     scoreManager    = GameObject.FindGameObjectWithTag("ScoreManager").GetComponent <ScoreManager>();
     upgradesManager = GameObject.FindGameObjectWithTag("UpgradesManager").GetComponent <UpgradesManager>();
     mainHUDManager  = GameObject.FindGameObjectWithTag("MainHUD").GetComponent <MainHUDManager>();
     healsManager    = GameObject.FindGameObjectWithTag("HealsManager").GetComponent <HealsManager>();
 }
Exemplo n.º 3
0
    // Called before start
    public void Awake()
    {
        // Get the game over audio source
        gameOverAudioSource = GetComponent <AudioSource>();

        // Get the main HUD manager
        mainHUDManager = FindObjectOfType <MainHUDManager>();

        // Get the ball
        ballRef = FindObjectOfType <Ball>();

        // Get the PaddleController
        paddleController = FindObjectOfType <PaddleController>();
    }
Exemplo n.º 4
0
    // Called before start
    public void Awake()
    {
        // Get the paddle's rigidbody
        paddleRigidBody = GetComponent <Rigidbody>();

        // Get the Ball
        ballRef = FindObjectOfType <Ball>();

        // Get the paddle nav point
        paddleNavPoint = FindObjectOfType <PaddleNavPoint>();

        // Get the GameManager
        gameManager = FindObjectOfType <GameManager>();

        // Get the MainHUDManager
        mainHUDManager = FindObjectOfType <MainHUDManager>();
    }