Esempio n. 1
0
    private void Awake()
    {
        this.objectGameDirector = GameObject.FindWithTag("Director");
        this.scriptDestroyAll   = this.objectGameDirector.GetComponent <DestroyAll>();
        this.scriptOutputTips   = this.objectGameDirector.GetComponent <OutputTips>();

        this.objectMainCamera = GameObject.FindWithTag("MainCamera");

        this.objectSEManager = GameObject.FindWithTag("SEManager");
        this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>();

        this.scriptTargetManager = this.GetComponent <TargetManager>();
    }
Esempio n. 2
0
    private void Awake()
    {
        this.objectBGMManager = GameObject.FindWithTag("BGMManager");
        this.objectSEManager  = GameObject.FindWithTag("SEManager");

        this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>();
        this.scriptSEManager  = this.objectSEManager.GetComponent <SEManager>();

        if (SceneManager.GetActiveScene().name == "Game")
        {
            this.objectGameDirector = GameObject.FindWithTag("Director");
            this.scriptDestroyAll   = this.objectGameDirector.GetComponent <DestroyAll>();
        }
    }
    private void Awake()
    {
        this.scriptBGMPlayer   = this.GetComponent <BGMPlayer>();
        this.scriptOutputScore = this.GetComponent <OutputScore>();
        this.scriptOutputTime  = this.GetComponent <OutputTime>();
        this.scriptOutputTips  = this.GetComponent <OutputTips>();
        this.scriptDestroyAll  = this.GetComponent <DestroyAll>();

        this.objectSEManager = GameObject.FindWithTag("SEManager");
        this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>();

        this.rendererPlayer = this.objectPlayer.GetComponent <MeshRenderer>();
        this.rendererEnemy  = this.objectEnemy.GetComponent <MeshRenderer>();

        this.scriptEnemyManager = this.objectEnemy.GetComponent <EnemyManager>();

        isGameRunning    = true;
        currentWave      = 0;
        timerBeforeRetry = 0;
    }
Esempio n. 4
0
 private void MoonshinePickup()
 {
     // has references to Enemy.cs
     DestroyAll?.Invoke();
     audioSource.PlayOneShot(explosionSFX);
 }