コード例 #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");
    }
コード例 #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>();
 }
コード例 #3
0
ファイル: GameManager.cs プロジェクト: Megawats777/PinballOne
    // 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>();
    }
コード例 #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>();
    }