Exemplo n.º 1
0
    private void Start()
    {
        if (seed == 0)
        {
            seed = Mathf.FloorToInt(Time.deltaTime * 10000000);
        }
        Random.InitState(seed);

        debugMode = Debug.isDebugBuild;

        if (!(keyValet = FindObjectOfType <KeyValet>()))
        {
            Debug.Log("ObjectSpawner.cs: keyValet INFO, ERROR.");
        }
        despawnKey     = keyValet.GetKey("ObjectSpawner-DespawnCommand");
        spawnAllKey    = keyValet.GetKey("ObjectSpawner-SpawnAllCommand");
        spawnRandomKey = keyValet.GetKey("ObjectSpawner-SpawnRandomCommand");

        spawnPoints = GameObject.FindGameObjectsWithTag(tagForSpawnPoints);
        var a = spawnPoints.Length;
        var b = tagForSpawnPoints;

        Debug.Log("ObjectSpawner.cs report: " + a + " spawn-points registered with tag '" + b + "'.");

        Invoke("SpawnAllSpawnpoints", delayBetweenWaves);
    }
Exemplo n.º 2
0
 private void Start()
 {
     keyValet         = FindObjectOfType <KeyValet>();
     levelValet       = FindObjectOfType <LevelValet>();
     brighter         = keyValet.GetKey("Light-Brighten");
     darker           = keyValet.GetKey("Light-Darken");
     directionalLight = GetComponent <Light>();
 }
Exemplo n.º 3
0
 private void Start()
 {
     if (!(audioSource = GetComponent <AudioSource>()))
     {
         Debug.Log("AudioHandler.cs: audioSource INFO, FAIL.");
     }
     if (!(keyManager = FindObjectOfType <KeyValet>()))
     {
         Debug.Log("AudioHandler.cs: keyManager INFO, FAIL.");
     }
     musicKey = keyManager.GetKey("MusicPlayer-MusicToggle");
 }
Exemplo n.º 4
0
    private void Start()
    {
        audioSource             = GetComponent <AudioSource>();
        keyValet                = FindObjectOfType <KeyValet>();
        playerHandler           = FindObjectOfType <PlayerHandler>();
        waypointProgressTracker = FindObjectOfType <WaypointProgressTracker>();

        debugMode = Debug.isDebugBuild;

        invulnerableKey = keyValet.GetKey("PlayerController-ToggleInvulnerable");
        maxEnergyKey    = keyValet.GetKey("PlayerController-ToggleEnergyMax");
        shieldKey       = keyValet.GetKey("PlayerController-ShieldCharge");
        weaponKey       = keyValet.GetKey("PlayerController-WeaponCharge");

        playerHandler.SetPlayerPosition(transform.localPosition);
        playerHandler.SetPlayerRotation(transform.localRotation);
        ChargeShieldBattery(true);
        ChargeWeaponBattery(true);

        waypointProgressTracker.SetForwardSpeed(basePlayerForwardSpeed);
    }
Exemplo n.º 5
0
    private void ClockInit()
    {
        audioSource  = GetComponent <AudioSource>();
        audioHandler = FindObjectOfType <AudioHandler>();
        levelValet   = FindObjectOfType <LevelValet>();
        keyValet     = FindObjectOfType <KeyValet>();

        endOfLine       = keyValet.GetKey("Clock-Quit");
        guiUp           = keyValet.GetKey("GUI-Larger");
        guiDown         = keyValet.GetKey("GUI-Smaller");
        toggleClick     = keyValet.GetKey("Clock-ToggleClicks");
        toggleLamp      = keyValet.GetKey("Clock-ToggleLamp");
        toggleOverlay   = keyValet.GetKey("Clock-ToggleOverlay");
        toggleStopwatch = keyValet.GetKey("Clock-ToggleStopwatch");
        switchTheme     = keyValet.GetKey("Clock-SwitchTheme");

        rFac_Hour = notch * rFac_12Hour * 2;
    }