// Use this for initialization
 void Start()
 {
     currentyGameState      = GAME_STATE.Playing;
     playerScore            = 0f;
     playerMultipler        = 1;
     playerPoints           = 100f; // Default Amount
     progressionTimer       = Time.timeSinceLevelLoad;
     progressionIncrementer = 0.8f;
     progressionCountdown   = 10f;
     bossTimer        = Time.timeSinceLevelLoad;
     bossCountdown    = 120f;
     currentSpawn     = SPAWN_NPC.Jeep;
     scoreDisplay     = GameObject.Find("Text_ScoreDisplay").GetComponent <Text>();
     multiDisplay     = GameObject.Find("Text_MultiplerDisplay").GetComponent <Text>();
     healthDisplay    = GameObject.Find("Text_HealthDisplay").GetComponent <Text>();
     audio            = GetComponents <AudioSource>();
     playerControl    = FindObjectOfType <PlayerController>();
     playerPrefs      = FindObjectOfType <PlayerPrefsControlScript>();
     minHealth        = playerPrefs.GetMinimumHealth();
     playerHealth    += minHealth;
     upgradedDamage   = playerPrefs.GetFirePower();
     playerDamage    += upgradedDamage;
     minMultiplier    = playerPrefs.GetMinimumMultipler();
     playerMultipler += minMultiplier;
     UpdateHUD();
 }
 void Start()
 {
     StartZ             = transform.position.z;
     projectileCooldown = Time.timeSinceLevelLoad;
     anim          = GetComponent <Animator>();
     gameControl   = FindObjectOfType <GameControlScript>();
     audio         = GetComponent <AudioSource>();
     playerPrefs   = FindObjectOfType <PlayerPrefsControlScript>();
     audio.volume  = playerPrefs.GetSfXVolume();
     autoFire      = playerPrefs.GetAutoFire();
     accelerometer = playerPrefs.GetAccelerometer();
 }
Example #3
0
 // Use this for initialization
 void Start()
 {
     gameControl  = FindObjectOfType <GameControlScript>();
     playerPrefs  = FindObjectOfType <PlayerPrefsControlScript>();
     moverScript  = FindObjectOfType <NPCObstacle>();
     audio        = GetComponent <AudioSource>();
     audio.volume = playerPrefs.GetSfXVolume();
     player       = GameObject.FindGameObjectWithTag("Player");
     npcDamage    = gameControl.GetNpcDamage();
     npcHealth    = gameControl.GetNpcHealth();
     IsShooterAndMaterial();
     DestroyGlitchedObject();
 }
Example #4
0
 // Use this for initialization
 void Start()
 {
     playerPrefs   = FindObjectOfType <PlayerPrefsControlScript>();
     gameScore     = playerPrefs.GetGameMoney();
     currentScore  = playerPrefs.GetCurrentGameMoney();
     currentScore += gameScore;
     earned        = GameObject.Find("Txt_GameScore").GetComponent <Text>();
     total         = GameObject.Find("Txt_CurrentGameScore").GetComponent <Text>();
     earned.text   = gameScore.ToString();
     total.text    = currentScore.ToString();
     playerPrefs.SetAccumalitiveMoney(playerPrefs.GetAccumalitiveMoney() + gameScore);
     gameScore = 0;
     playerPrefs.SetGameMoney(gameScore);
     playerPrefs.SetCurrentGameMoney(currentScore);
     evSystem = FindObjectOfType <EventSystem>();
 }
Example #5
0
 // Use this for initialization
 void Start()
 {
     optionCanvas  = GameObject.Find("OptionsCanvas");
     upgradeCanvas = GameObject.Find("UpgradeCanvas");
     prefsControl  = FindObjectOfType <PlayerPrefsControlScript>();
     musicControl  = FindObjectOfType <MusicControl>();
     evSystem      = FindObjectOfType <EventSystem>();
     hording       = GameObject.Find("Txt_Hordings").GetComponent <Text>();
     level         = GameObject.Find("Txt_Level").GetComponent <Text>();
     firePower     = GameObject.Find("Txt_FirePower").GetComponent <Text>();
     health        = GameObject.Find("Txt_Health").GetComponent <Text>();
     multipler     = GameObject.Find("Txt_Multiplier").GetComponent <Text>();
     error         = GameObject.Find("Txt_Error").GetComponent <Text>();
     CalculateLevel();
     SetDefaultValues();
 }
Example #6
0
 void Start()
 {
     audio        = GetComponent <AudioSource>();
     playerPrefs  = FindObjectOfType <PlayerPrefsControlScript>();
     audio.volume = playerPrefs.GetMusicVolume();
 }