void Start() { if (PlayerPrefs.GetFloat("SHIELDBOOSTER_SKILL") == 1) { Skill1.SetActive(true); } if (PlayerPrefs.GetFloat("REPAIR_SKILL") == 1) { Skill2.SetActive(true); } if (PlayerPrefs.GetFloat("SHIELDDEFLECTOR_SKILL") == 1) { Skill7.SetActive(true); } if (PlayerPrefs.GetFloat("DIPLOMACY_SKILL") == 1) { Skill4.SetActive(true); //Skill4Charge.SetActive (false); } if (PlayerPrefs.GetFloat("EVADEBOOSTER_SKILL") == 1) { Skill5.SetActive(true); } isItSingleFight = SingleFightScriptPlace.FindObjectOfType <SingleFightScriptPlace> (); }
void Start() { singleFight = SingleFightScriptPlace.FindObjectOfType <SingleFightScriptPlace> (); if (singleFight != null) { enemyHealthSingleFight = EnemyFireAndDamage.FindObjectOfType <EnemyFireAndDamage> (); enemyHealthHere = enemyHealthSingleFight.EnemyHealth; } if (singleFight == null) { enemyHealthMultipleFight = TwoEnemiesAttackingScript.FindObjectOfType <TwoEnemiesAttackingScript> (); enemyHealthHere = enemyHealthMultipleFight.EnemyHealth; } }
void Start() { shieldHealth = PlayerPrefs.GetFloat("SHIELD_HEALTH"); evade = PlayerPrefs.GetFloat("Evade"); //---------------------------------DETERMINE IF THIS IS A SINGLE FIGHT OR MULTI -------------------------------------- singleFight = SingleFightScriptPlace.FindObjectOfType <SingleFightScriptPlace> (); if (singleFight == null) { isThisSingleFight = false; } if (singleFight != null) { isThisSingleFight = true; } //--------------------------------------------------------------------------------------------------------------------- }
void Start() { singleFight = SingleFightScriptPlace.FindObjectOfType <SingleFightScriptPlace> (); playerhealth = PlayerHealth.FindObjectOfType <PlayerHealth> (); playerController = RTSBattleController.FindObjectOfType <RTSBattleController> (); battleController = BattleControllerTurnBased.FindObjectOfType <BattleControllerTurnBased> (); if (singleFight == null) { playerController2 = PlayerAttackScriptMultipleEnemies.FindObjectOfType <PlayerAttackScriptMultipleEnemies> (); battleController2 = BattleControllerTurnBasedMultipleScript.FindObjectOfType <BattleControllerTurnBasedMultipleScript> (); } /*repair.SetActive (false); * shield.SetActive (true); * attackPoints.SetActive (false); * weaponBoost.SetActive (false); */ CheckIfAnyActive(); }
void Start() { var aSource = GetComponents <AudioSource> (); SoundForShield = aSource [0]; SoundRegular = aSource [1]; SoundRegular2 = aSource [2]; SoundRegular3 = aSource [3]; SoundForShield2 = aSource [4]; singleFight = SingleFightScriptPlace.FindObjectOfType <SingleFightScriptPlace> (); if (singleFight != null) { if (RTSBattleController.shieldOn == true) { int whichOne = Random.Range(0, 2); Debug.Log("which one is : " + whichOne); if (whichOne == 0) { SoundForShield.Play(); } if (whichOne == 1) { } } if (RTSBattleController.shieldOn == false) { int whichone = Random.Range(1, 4); SoundForShield.playOnAwake = false; aSource [whichone].Play(); //SoundRegular.playOnAwake = true; } } if (singleFight == null) { if (PlayerAttackScriptMultipleEnemies.shieldOn == true) { int whichOne = Random.Range(0, 2); if (whichOne == 0) { SoundForShield.Play(); } if (whichOne == 1) { } } if (PlayerAttackScriptMultipleEnemies.shieldOn == false) { SoundForShield.playOnAwake = false; //SoundRegular.playOnAwake = true; int whichone = Random.Range(1, 4); SoundForShield.playOnAwake = false; aSource [whichone].Play(); } } }